<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andrea Mariotti on Medium]]></title>
        <description><![CDATA[Stories by Andrea Mariotti on Medium]]></description>
        <link>https://medium.com/@andrea.mariotti?source=rss-c2537301a06b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KuU-QWTCnKyIJ_mTFqil1A.jpeg</url>
            <title>Stories by Andrea Mariotti on Medium</title>
            <link>https://medium.com/@andrea.mariotti?source=rss-c2537301a06b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 19:55:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andrea.mariotti/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Shipping iOS and Android in Parallel with Flutter]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/shipping-ios-and-android-in-parallel-with-flutter-143b91df9421?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/143b91df9421</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 18:06:50 GMT</pubDate>
            <atom:updated>2026-08-12T18:10:34.894Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*8Wf87insno5JeCAvhdk5AQ.png" /></figure><p>How we semi-automated builds, signing, and uploads so a small team could ship a couple of beta releases a day</p><p>This story is meant to be educational and freely accessible. Feel free to use my friends link to read it <a href="https://medium.com/software-engineering-for-the-real-world/shipping-ios-and-android-in-parallel-with-flutter-143b91df9421?source=friends_link&amp;sk=0b627657f8ab127c594b133a0378bdae">here</a>.</p><p>When we set out to ship Scrybus on phones, we had a familiar problem: two app stores, two signing systems, and a team that needed to move faster than a dual native stack would allow. We chose Flutter — and then we treated release engineering as a first-class product feature. The result was one codebase, two store builds in parallel, and a semi-automated pipeline that let us push as many as a couple of new releases per day to beta testers.</p><blockquote>Note: we have since pivoted so these apps are not longer available to download. We might release new versions if the new use case requires it. A lot of work went into building these apps and the best practice needed to iterate quickly so I decided to share our work here to help others.</blockquote><p>This is how we did it, and the practical tips we’d give any team trying to ship mobile without drowning in ceremony.</p><p><strong>One codebase, two platforms — without pretending they’re identical</strong></p><p>Flutter’s pitch is simple: write once, run on iOS and Android. That part worked. Feature work — auth, document workflows, PDF viewing, signing, clients, in-app purchases — lived in shared Dart. We still kept thin platform seams where the stores demanded them: StoreKit vs Play Billing, camera and photo permissions, deep links, and secure storage.</p><p>What mattered more than “100% shared UI” was <strong>one release cadence</strong>. A bug fix or beta build number lived in a single version line in pubspec.yaml. Bumping 2.5.x+N once meant both platforms carried the same story into TestFlight-style testing and Play internal testing. Testers never wondered which platform got the fix.</p><blockquote><strong>Tip: </strong>Treat versioning as the contract with your beta cohort. One version name, one build number, two artifacts. If Android and iOS diverge in numbering, support becomes archaeology.</blockquote><p><strong>Parallel by default: same change, two signed binaries</strong></p><p>Our day-to-day flow looked like this:</p><p>1. Land the change in the shared Flutter app.</p><p>2. Bump the version in pubspec.yaml.</p><p>3. Kick off the iOS and Android release scripts side by side.</p><p>4. Do the short human steps: upload the IPA and the App Bundle to each store’s beta track.</p><p>5. Ping testers with the new build number. This part is actually automated in both mobile stores.</p><p>Because Flutter compiles for both targets from the same tree, we weren’t waiting on a second team to “port” the release. The bottleneck shifted from <em>writing two apps</em> to <em>signing and uploading two packages</em>, and that’s a bottleneck you can script.</p><blockquote><strong>Tip:</strong> Optimize for wall-clock parallelism. On a Mac with Xcode and the Android SDK, start both release builds before you open either store console. By the time the first upload finishes, the second artifact is usually waiting. I acted as build engineer and did the build on the same machine back to back but you can easily do parallel builds on different machines if you have a distributed team. Just make sure you assign owership and responsibility first with a well documented go/no-go checklist for release with one release owner across all platforms.</blockquote><p><strong>Semi-automate the painful middle: build, sign, verify</strong></p><p>Fully unattended store uploads are nice; they’re also easy to over-engineer early. We aimed for <strong>semi-automation</strong>: scripts that make a signed, store-ready binary every time, and a human who confirms the upload destination and release notes.</p><p><strong>Android: keystore on rails</strong></p><p>For Android we scripted a boring, reliable path:</p><p>- Fail fast if key.properties or the keystore file is missing.</p><p>- Run flutter clean and flutter pub get so dependency drift doesn’t surprise you mid-upload.</p><p>- Build a release App Bundle for Play (`flutter build appbundle — release`).</p><p>- Print the SHA-1 fingerprint from the resulting .aab so you can confirm you’re signing with the key Play expects — not a leftover debug keystore from last month.</p><p>That last check saved more than one “why is Play rejecting this?” hour. Signing configuration lived in Gradle release config; secrets stayed out of git. The script’s job was to make the happy path one command and the failure modes obvious.</p><blockquote><strong>Tip: </strong>Always verify the signature of the artifact you’re about to upload. A successful build is not the same as a correctly signed build.</blockquote><p><strong>iOS: IPA out of the CLI, not only out of the Archive UI</strong></p><p>On iOS we pushed further than “open Xcode and click Archive.” The release script:</p><p>- Resolves the Apple Distribution identity from the keychain.</p><p>- Runs `flutter build ipa — release` with an ExportOptions.plist aimed at App Store distribution.</p><p>- Applies a small post-build patch when needed (for example, normalizing MinimumOSVersion inside embedded frameworks).</p><p>- Re-signs App.framework and the app bundle with the correct entitlements.</p><p>- Ensures Swift support libs are packaged when required.</p><p>- Leaves a ready-to-upload Runner.ipa and reveals it in Finder for Apple Transporter.</p><p>That last hop — Transporter — stayed manual on purpose. Store credentials, 2FA, and “did we mean internal vs external testing?” are exactly where a human should stay in the loop. Everything before that became muscle memory: one script, one IPA, one drag into Transporter.</p><blockquote><strong>Tip: </strong>Prefer CLI IPA export early, even if you still upload by hand. Once flutter build ipa plus signing is reliable, wiring App Store Connect API upload later is incremental. Starting from “always click through Xcode Organizer” makes daily releases feel expensive.</blockquote><p><strong>Make upload the only human gate</strong></p><p>The pattern that unlocked multiple betas per day was simple: automate everything up to the store door.</p><p><strong>Automated</strong></p><p>- Version bump (or a one-line edit)</p><p>- Dependencies and clean</p><p>- Compile release for iOS and Android in parallel</p><p>- Sign and export</p><p>- Signature / artifact sanity check</p><p><strong>Still human</strong></p><p>- Confirm the changelog</p><p>- Spot-check if something looks off</p><p>- Upload via Transporter and Play Console</p><p>- Send the tester notification</p><p>We did not wait for full App Review to learn. Internal and closed testing tracks exist so you can ship often. Review is for production; beta is for learning.</p><blockquote><strong>Tip:</strong> Separate <em>shipping to testers</em> from <em>shipping to the world</em>. Your pipeline should make the first path almost boring. Production promotion can stay slower and more deliberate.</blockquote><blockquote><strong>Tip</strong>: Note that keeping the store step manual is critical to ensure quality of service when you are in production. For example, for internal testing purpose we shipped builds that pointed to the staging cloud. Those builds should not find their way to the production distribution: this is not where you want to find out your agent hallucinated! Thus a human took ownership and responsibility for this last gate.</blockquote><p><strong>Practical tips for a couple of releases a day</strong></p><p><strong>1. Keep the shared core thick and the platform edges thin.</strong></p><p>Every custom iOS-only or Android-only path is another place a same-day dual release can diverge. Prefer Flutter plugins and shared services; isolate store-specific purchase and permission code.</p><p><strong>2. Script the ritual, not the exception.</strong></p><p>Clean, pub get, build, sign, verify, open the artifact. If you catch yourself doing those steps manually twice a day, you’re burning focus that should go to product feedback.</p><p><strong>3. Fail loudly on missing secrets.</strong></p><p>A missing key.properties, a wrong keystore path, or no Distribution cert should abort in the first seconds — not after a 10-minute compile.</p><p><strong>4. Keep export options and signing structure in the repo (secrets out).</strong></p><p>ExportOptions.plist, Gradle signing structure, and the build scripts belong in version control. Passwords, keystores, and API keys do not.</p><p><strong>5. Use store beta tracks as your CI for humans.</strong></p><p>A couple of releases per day only works if testers can install quickly and tell you what’s broken. Short release notes with the build number beat essays.</p><p><strong>6. Don’t chase full CI/CD on day one.</strong></p><p>Semi-automation got us most of the speed. When uploads become the bottleneck, add App Store Connect API and Play Developer API upload as the next layer — not the first.</p><p><strong>7. Hot reload for development, release scripts for truth.</strong></p><p>Flutter’s hot reload made iteration on device feel instant. We never confused that with a store build. Only the signed release scripts defined what testers actually ran.</p><p><strong>What we got out of it</strong></p><p>Flutter didn’t just save us from maintaining two UIs. It let one small team own <strong>one product surface</strong> on both phones and still keep pace with backend and workflow changes. The semi-automated build and signature path turned “cut a release” from an afternoon of tribal knowledge into a short, repeatable loop: bump, build both, upload both, tell testers.</p><p>If you’re choosing a mobile stack for speed, evaluate release engineering as carefully as widgets. The framework that ships twice a day to beta is the one that compounds learning. For us, that was Flutter — plus a few stubborn scripts that refused to let signing stay mysterious.</p><p><em>*Building contract and vendor workflows that don’t suck is our day job at [Scrybus](</em>https://scrybus.com<em>). If you’re wrestling with the same mobile release grind, we hope these tips shave a few hours off your next beta.*</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=143b91df9421" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/shipping-ios-and-android-in-parallel-with-flutter-143b91df9421">Shipping iOS and Android in Parallel with Flutter</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Development for Autonomous Sailing Drones: Engineering Resilience for 24x7x365 Operations]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/software-development-for-autonomous-sailing-drones-engineering-resilience-for-24x7x365-operations-8c8861f59c1a?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c8861f59c1a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[sailing]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[autonomy]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 16:54:33 GMT</pubDate>
            <atom:updated>2026-01-22T17:01:48.871Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*RLQvHfVaRJFlneWW.jpg" /><figcaption>AI rendering of an autonomous sailing drone.</figcaption></figure><p>This story is meant to be freely accessible. Use this <a href="https://medium.com/software-engineering-for-the-real-world/software-development-for-autonomous-sailing-drones-engineering-resilience-for-24x7x365-operations-8c8861f59c1a?source=friends_link&amp;sk=0fddf7ef677093cf879d573ad5924d3b">link</a> to read it.</p><h3>Preamble</h3><p>This essay explores building software for autonomous platforms that operate continuously without human intervention. It is not a definitive blueprint, but a provocation — intended to spark critical discussion about how we engineer, deploy, and sustain autonomous systems at scale.</p><p>The principles here emerge from real-world experience. Some reflect validated practices; others are emerging patterns deserving scrutiny. The challenges of 24x7x365 autonomy evolve as systems grow more capable and failure modes more subtle.</p><p><strong>Intended for:</strong> Technical leaders, architects, and senior engineers designing autonomous systems at scale, with familiarity in distributed systems and real-world operational constraints.</p><p>⸻</p><h3>Designing for the Moon</h3><p>The defining constraint: autonomous assets must operate assuming hands-on intervention is impossible. No reboots, no manual repairs, no emergency fixes. Every design decision — from embedded software to cloud infrastructure to organizational structure — flows from this premise.</p><p>This philosophy crystallized from operational experience. Early field deployments revealed a critical failure mode: a compute node running sensor fusion began failing intermittently, undetectable until the vehicle was in high-stress situations. The fix required physical retrieval. The lesson: never deploy an architecture that assumes you can reach the vehicle to fix it.</p><p>The result is treating each vehicle, vessel or drone as if it were on the Moon — completely autonomous, completely unreachable, fully dependent on software-defined resilience.</p><p>⸻</p><h3>Three Tiers: A Complete System</h3><p>Autonomous sailing drones require a tightly integrated software ecosystem spanning three domains.</p><p><strong>Tier 1: Vehicle\Vessel Software</strong> — The most critical and least accessible component. Redundancy must go beyond simple backups: multiple independent compute nodes for critical functions, sensor fusion that tolerates degradation, and sophisticated health monitoring that predicts failures before they become catastrophic.</p><p>Health monitoring sounds simple in theory. In practice, it’s treacherous. Redundant systems create new failure modes — disagreement between nodes about state can trigger conflicting corrective actions. Choosing what to log is genuinely difficult; lose the wrong data and failures become undiagnosable, but retain too much and logging itself becomes a bottleneck.</p><p><strong>Tier 2: Cloud-Based Fleet Management</strong> — Coordinates multiple vessels despite unreliable, high-latency connectivity. The cloud cannot be the real-time source of truth. Vessels must operate autonomously with cached mission parameters, syncing opportunistically when communication allows.</p><p>The hard part: ensuring shared understanding of mission state despite asymmetric information flow. A course-change command issued by an operator might take several minutes to reach the vessel. By then, the situation has changed. Commands must include environmental preconditions — “only execute if sea state is below X” — to prevent obsolete instructions. But this means some commands never execute, and operators must understand why. Similarly to what we did at Faction with Drivelink(tm) where the vehicle was always in charge of its safety and it decided what to do next and how to execute the mission. This was done by design to ensure vehicles could operate with extended connectivity loss.</p><p><strong>Tier 3: Operator Interfaces</strong> — Present complex system state clearly and enable safe intervention. The temptation is to show everything; the reality is that comprehensive dashboards create information overload at the moments operators most need clarity (2 AM alerts, high-stress anomalies). Effective interfaces surface what matters: is the vessel healthy? What is it doing? Are there anomalies requiring attention?</p><p>⸻</p><h3>Software-Defined Vessels and Strategic Partnerships</h3><p>Rather than treating hardware as fixed, a software-defined architecture allows functionality to be updated and optimized throughout the vessel’s operational life — including individual sensors and subsystems.</p><p>This requires deep partnerships with manufacturers to push OTA updates beyond central software to sensor firmware. Most marine sensor vendors lack this infrastructure. Getting there requires either building update mechanisms for them (expensive, creates support burden) or finding vendors willing to invest themselves (rare, requires sustained partnership).</p><p>The payoff is real: firmware corrections and optimizations can be deployed fleet-wide in hours rather than months. But the initial cost is substantial, and not every vendor relationship justifies it.</p><p>⸻</p><h3>Distributed Architecture Trade-offs</h3><p>Modular, distributed architectures (ROS2 or custom frameworks) enable elegant self-healing through dynamic reconfiguration. When a compute node begins to fail, workloads migrate to spare capacity, services restart, and operation continues.</p><p>But achieving real reliability demands deep systems knowledge. At sea, networks don’t degrade gracefully — they disappear entirely for hours. Clock synchronization across distributed compute becomes critical and fragile; a 100ms skew can destroy message ordering guarantees. Debugging under stress, with intermittent network failures and thermal throttling, requires expertise that is scarce.</p><p>Sophisticated failure cascade prediction sounds elegant in simulation. In practice, patterns are noisier, thresholds require constant tuning, and false positives train operators to ignore alerts. A system that cries wolf about impending failure too often becomes useless.</p><p>⸻</p><h3>Over-the-Air Updates: Layered Defense</h3><p>OTA updates are critical — but failures can brick a vessel at sea. Safe OTA requires multiple layers:</p><ul><li><strong>Staged rollouts</strong> with health monitoring that pauses automatically on regression</li><li><strong>Dual-partition systems</strong> allowing automatic rollback to known-good software</li><li><strong>Semantic validation</strong> beyond “does it boot?” — checking that sensors return plausible values given known location and environment</li><li><strong>Signed artifacts</strong> preserving chain of trust</li></ul><p>Even with these layers, surprises emerge. One deployment pushed a sensor driver mapping that accidentally swapped left with right sensors. the sensors “worked” but inverted readings went undetected during validation, only surfacing when the vehicle attempted a course change. Semantic validation must be sophisticated enough to catch these issues — which requires deep understanding of expected behaviors and their variability across conditions.</p><p>⸻</p><h3>Hardware-in-the-Loop Testing: Simulation Limits</h3><p>HIL testing exposes interaction effects early — scenarios where multiple minor failures combine into catastrophic outcomes. But simulation has fundamental limitations.</p><p>Simulating a sailing vessel requires accurate aerodynamic and hydrodynamic models. Most simulators use simplified versions capturing first-order behavior but missing subtleties. A vessel trained in simulation behaves differently in the real world — not catastrophically, but noticeably. Bridging this gap requires continuous tuning based on field data, meaning you don’t have a stable simulation until after you’ve already deployed and observed the real system.</p><p>Some failure modes are nearly impossible to simulate: corrosion of connectors, electromagnetic interference from the vessel’s own systems, water intrusion into sealed enclosures. These require accepting operational risk in early deployments. The tension between “thoroughly tested in simulation” and “this might still fail in the real world” remains unresolved.</p><p>⸻</p><h3>Where These Principles Break</h3><p><strong>Cost and over-engineering</strong>: For a six-month mission vessel, investing in redundant hardware and months of HIL testing makes sense. For a one-month proof-of-concept, it’s probably overkill. Similarly for short range drones that stay in range of a mother ship.</p><p><strong>Organizational fatigue</strong>: Discipline slows velocity. A team implementing rigorous review, design validation, and staged rollouts will ship features roughly 40–50% slower than a team with minimal process. For mission-critical systems, worth it. For exploratory research, debatable. A layered approach to safety system allows for “development” vessels to be used in controlled environment to test new features/ideas quickly without sacrificing safety. We applied this principle at both CYNGN and Faction where the safety layer close to the metal was always able to override instructions coming from top layers in order to enforce safety operational domain rules.</p><p><strong>Complexity vs. debuggability</strong>: Modularity aids resilience but complicates debugging and certification. Simpler, more tightly coupled architectures may be preferable in some contexts.</p><p><strong>Power budgets</strong>: Redundancy consumes energy. A fully redundant system requires 2–3x battery capacity, directly impacting mission duration or BOM (bigger hydrodynamic generator, bigger batteries, bigger overall vessel to fit all the hardware etc.) or both.</p><p><strong>Regulatory friction</strong>: Frequent OTA updates may conflict with certification regimes favoring fixed, validated software.</p><p><strong>When simpler autonomy wins</strong>: Not every mission requires maximal sophistication. A vessel operating in a constrained area with human oversight might be better served by conservative autonomy than by the full architectural stack. Design the platform to be software configurable to fit the mission profile.</p><p>There is no formula — only judgment informed by mission requirements, economics, and honest assessment of what your team can maintain.</p><p>⸻</p><h3>Organizational Structure: Supervised Coding</h3><p>Technical complexity demands organizational clarity. Teams that build subsystems own their operation. But this only works if the organization accepts that ownership sometimes means accepting losses — which creates tension toward risk-averse, conservative decision-making.</p><p>Supervised Coding is a high-leverage practice for building reliable systems. Unlike traditional post-implementation review, it involves review at multiple stages: design phase, during implementation, and before integration. In practice:</p><ul><li><strong>Design reviews</strong> catch architectural mistakes before weeks of work are sunk</li><li><strong>Implementation review</strong> ensures code matches validated design and addresses integration concerns as they arise</li><li><strong>Integration review</strong> involves dependent teams assessing compatibility and impact</li></ul><p>The benefits are substantial: design flaws caught early, junior engineers mentored in real-time, integration friction minimized. The costs are also real: a two-week feature now requires coordination across multiple senior engineers, creating calendar bottlenecks and slowing overall velocity.</p><p>Success requires a culture that genuinely values quality over individual authorship. Feedback must be perceived as collaborative problem-solving, not personal criticism. This demands specific hiring and retention practices that are not universal.</p><p>⸻</p><h3>Sustaining Discipline at Scale</h3><p>Building autonomous vessels that operate 24x7x365 requires more than clever software. It demands disciplined engineering, realistic trade-offs, and organizations willing to sustain rigor over years of operation.</p><p>The three-tier architecture — resilient vessel software, fleet-aware cloud intelligence, safety-first human interfaces — forms a coherent whole when guided by “designing for the Moon.” But this is not a universal blueprint. Over-engineering carries its own risks.</p><p>The technical problems are increasingly understood. The hard part — and the one that separates successful autonomous platforms from failed ones — is organizational.</p><p><strong>The unresolved question:</strong> How do we build organizations that can sustain this discipline as fleets scale from dozens to thousands of vessels, without crystallizing into bureaucratic rigidity?</p><p>Preliminary patterns are emerging: organizations that scale successfully invest heavily in documentation and decision artifacts — design documents, failure postmortems, recorded architectural decisions — allowing knowledge made by small teams to inform future work without requiring all engineers to participate in every decision. They also hire senior engineers faster than junior engineers, maintaining the expertise-to-experience ratio high enough that mentorship and quality standards don’t degrade.</p><p>But we’re still learning. The first true fleet-scale autonomous maritime systems are entering long-term operation now. The next five years will reveal which organizational patterns actually sustain discipline and which create unforeseen problems. That learning — shared openly across the industry — will ultimately matter more than any architectural principle discussed here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c8861f59c1a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/software-development-for-autonomous-sailing-drones-engineering-resilience-for-24x7x365-operations-8c8861f59c1a">Software Development for Autonomous Sailing Drones: Engineering Resilience for 24x7x365 Operations</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debugging Under Supervised Coding Principles]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/debugging-under-supervised-coding-principles-0311785a58fb?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0311785a58fb</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[qa-automation]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Wed, 21 Jan 2026 17:47:19 GMT</pubDate>
            <atom:updated>2026-01-21T17:47:57.589Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is meant to be freely accessible. Feel free to use this <a href="https://medium.com/@andrea.mariotti/0311785a58fb?source=friends_link&amp;sk=b2ea7e1e4ec01543ed105695a76e497c">link</a> to read it.</p><h3>Introduction</h3><p>Debugging presents one of the most critical tests of Supervised Coding discipline — the practice of maintaining developer control and understanding while leveraging AI as a tool for implementation and analysis. When a bug surfaces in production or testing, the instinct is often to patch it quickly: find the offending line and fix it without fully understanding the system’s behavior.</p><p>Under Supervised Coding principles, debugging becomes something more valuable — an opportunity to deepen understanding, identify systemic flaws, and fix not just symptoms but root causes. The process transforms the developer from bug-fixer into investigator and architect, with the AI serving as research assistant and implementation partner.</p><p>This essay outlines a structured approach to debugging that maintains accountability, ensures comprehensive understanding, and prevents similar issues from recurring.</p><h3>Step One: Hypothesis Formation Through Investigation</h3><p>When a bug is reported, resist the urge to immediately open the codebase. Begin instead with investigation: gather evidence, understand the failure mode, and form hypotheses about what went wrong.</p><p>AI becomes invaluable here. Provide the AI with three critical inputs:</p><ul><li>The bug report or reproduction steps</li><li>Relevant logs from the system where the error occurred</li><li>The affected codebase sections</li></ul><p>Ask the AI to analyze this material and propose hypotheses about why the bug occurs.</p><p>Your role as developer is not to accept the first hypothesis presented, but to evaluate each critically. Which hypotheses are plausible given the system’s architecture? Which align with observed behavior? Which contradict known constraints or specifications? Through this dialogue, narrow the possibilities to the most likely causes.</p><p><strong>Important</strong>: AI analysis can be incorrect. Treat hypotheses as starting points for investigation, not as definitive answers. Validate assumptions against system behavior and your architectural knowledge.</p><p>This investigative phase serves two crucial purposes: it forces you to think deeply about the system before touching any code, and it creates a written record of hypotheses that can guide subsequent investigation if initial assumptions prove incorrect.</p><h3>Step Two: Understanding the Logic Flow</h3><p>Once you’ve formed hypotheses, trace exactly how the system arrived at its incorrect behavior. This requires following the data flow from origin to manifestation.</p><p>Consider a concrete example: your system displays database records that should not be visible based on the current user’s selection or permissions. The bug isn’t isolated to a single line — it represents a failure in the system’s filtering, authorization, or rendering logic. To fix this correctly, you must understand where the failure occurs.</p><p>Ask the AI to analyze the code and provide a step-by-step explanation of how data flows through the system:</p><ul><li>How does the backend receive the selection criteria or authorization context?</li><li>How are those criteria translated into a database query?</li><li>What filtering logic is applied at the data access layer?</li><li>How is the filtered data serialized and transmitted to the frontend?</li><li>How does the frontend receive, parse, and render that data?</li><li>Are there any additional filtering or authorization checks at the frontend?</li></ul><p>The AI should produce a detailed walkthrough showing the complete journey of data through the system. Review this explanation carefully to gain explicit understanding of each layer’s responsibility. More importantly, you can now identify where the logic breaks down.</p><p>In our example, incorrect records might appear due to several different failures: a missing filter in the SQL query, a bug in the authorization logic, incorrect serialization that loses filter metadata, or a frontend component that renders all received data without applying intended restrictions. Each represents a different architectural problem requiring a different fix.</p><h3>Step Three: Architectural Analysis and Root Cause Identification</h3><p>With the data flow documented, perform the critical architectural analysis. This is where you transition from investigator to architect.</p><p>Review the step-by-step explanation and identify where the logic fails. More importantly, determine which layer or module is responsible for that failure according to the system’s design principles.</p><p>This distinction is essential. In the filtering example: if the database query correctly excludes certain records but the frontend receives and displays them anyway, the bug is in the frontend’s responsibilities, not the backend. Conversely, if the frontend correctly attempts to filter but receives unfiltered data from the backend, the bug belongs to the backend layer.</p><p>Each module in a well-designed system has a clear specification. The data access layer is responsible for applying business logic constraints at the database level. The API or serialization layer is responsible for accurate data transmission. The frontend is responsible for correctly interpreting and displaying data according to specifications.</p><p>Identify which module is violating its specification — this is the module you will fix. Fixing the wrong layer (adding a frontend filter when the backend should never have returned unfiltered data) treats a symptom rather than solving the problem. It also creates technical debt by distributing responsibility incorrectly.</p><p><strong>Note</strong>: Sometimes defense-in-depth is appropriate. Security-critical operations and data integrity checks may legitimately require validation at multiple layers. The key question is whether you’re deliberately implementing redundant safeguards or accidentally papering over a fundamental flaw.</p><p>Ask yourself and the AI: Given the design principles and specification for each module, which layer is responsible for this failure? Which module violated its contract?</p><h3>Step Four: Targeted Implementation</h3><p>Once you’ve identified the responsible layer, instruct the AI to fix only that module.</p><p>This specificity is vital. Provide the AI with:</p><ul><li>The module’s specification</li><li>An explanation of the failure</li><li>A request for a fix that addresses the root cause in the correct layer</li></ul><p>The fix should:</p><ul><li>Maintain the module’s original responsibility and contract</li><li>Avoid duplicating logic that should exist elsewhere</li><li>Preserve or improve the module’s design quality</li></ul><p>Do not ask the AI to fix multiple layers or make broad changes. You are the architect — you decide what changes where. The AI executes your architectural decision.</p><p>This approach prevents a common antipattern: when developers don’t understand the full data flow, they often layer fixes on top of each other. A missing filter in the backend gets patched with a frontend filter. Authorization logic gets duplicated across layers. The codebase becomes fragile and difficult to maintain.</p><p>By fixing only the responsible module, you maintain clean architectural boundaries and preserve the system’s conceptual integrity.</p><h3>Step Five: Unit Testing the Fix</h3><p>With the implementation complete, testing begins immediately — and testing, too, falls under Supervised Coding discipline.</p><p>Ask the AI to generate unit tests for the fixed module. These tests should cover:</p><ul><li>The specific scenario that triggered the bug</li><li>Related scenarios that should behave similarly</li><li>Edge cases relevant to the module’s logic</li><li>Any boundary conditions or constraints the module enforces</li></ul><p>Review the AI-generated tests carefully. Do they actually validate the fix? Do they test meaningful behavior or merely achieve coverage? Do they reflect the module’s specification?</p><p>A test that passes because the module now correctly filters data is meaningful. A test that merely checks that the function runs without crashing is not. As the supervising developer, you are responsible for test quality, not just test quantity.</p><p>Iterate with the AI if necessary:</p><ul><li>“This test doesn’t adequately cover the authorization logic”</li><li>“We need a test for when the selection criteria are empty”</li><li>“This test doesn’t validate the data structure of the returned records”</li></ul><h3>Step Six: Impact Analysis and Regression Testing</h3><p>Fixing a bug in one layer can have unintended consequences in others. Does the system still behave correctly in scenarios unrelated to the bug fix?</p><p>Ask the AI to generate regression tests — tests that validate the system’s behavior beyond the immediate bug fix. These might include:</p><ul><li>Tests for other features that depend on the fixed module</li><li>Tests for data flows that use the same code paths</li><li>Tests for edge cases that should continue working as before</li></ul><p>Review these tests for comprehensiveness. Do they test what actually matters?</p><p>Run both the unit tests for the fix and the regression tests for the broader system. Both should pass before proceeding. If regression tests fail, you’ve discovered an unintended consequence — valuable information that should drive refinement of the fix.</p><h3>Step Seven: Code Review and Quality Assurance</h3><p>Only after unit tests and regression tests pass should the fixed code proceed to pull request review and quality assurance.</p><p>At this point, you are submitting code that:</p><ul><li>Was created in response to a clearly understood root cause</li><li>Fixes only the responsible module, maintaining architectural boundaries</li><li>Is accompanied by tests that validate the fix</li><li>Has been verified not to break existing functionality</li></ul><p>This is code you, as the supervising developer, fully understand and are willing to defend. You have not outsourced understanding to the AI; you have leveraged AI as a tool while maintaining accountability.</p><p>The pull request review and QA process can now focus on validating your architectural decisions and test coverage rather than discovering basic failures or architectural problems. Your colleagues can trust that the fix is sound because they can see the reasoning, the implementation, and the tests that validate it.</p><h3>Balancing Rigor with Urgency</h3><p>This methodology emphasizes thoroughness, which raises a practical question: what about urgent production bugs that need immediate resolution?</p><p>The answer lies in two-phase fixes:</p><p><strong>Phase One (Immediate)</strong>: For critical production issues, implement the minimal fix necessary to restore service. Document this as a temporary measure.</p><p><strong>Phase Two (Proper)</strong>: Follow the full investigative process outlined here to implement the correct architectural fix, then replace the temporary solution.</p><p>This approach acknowledges reality — sometimes speed is necessary — while maintaining the principle that proper fixes require proper understanding. The key is treating urgent patches as temporary by design, not as permanent solutions.</p><h3>The Cultural Significance of Supervised Debugging</h3><p>This approach embodies the core principle of Supervised Coding: the developer as architect and supervisor, the AI as capable assistant.</p><p>It resists several tempting shortcuts:</p><ul><li>Applying patches without understanding root causes</li><li>Allowing the AI to make architectural decisions</li><li>Skipping tests because “the AI generated correct code”</li><li>Submitting code for review without confidence in its correctness</li></ul><p>These shortcuts feel fast in the moment but accumulate as technical debt. They also erode your understanding of your own system, creating dangerous dependence on the AI.</p><p>Supervised debugging, by contrast, feels slower initially. Investigation takes time, understanding the data flow requires effort, deciding which layer should be fixed demands architectural thinking. But this slowness is the system working correctly. You are spending time on what matters: understanding, decision-making, and verification. The AI accelerates execution within that framework but does not replace it.</p><h3>Conclusion</h3><p>Debugging under Supervised Coding principles transforms what could be a reactive, ad-hoc process into a systematic, architectural discipline. The developer investigates thoroughly, understands completely, decides authoritatively, and verifies rigorously. The AI provides research assistance, implementation support, and test generation — always under supervision.</p><p>This approach produces:</p><ul><li>More reliable fixes that address root causes</li><li>Prevention of similar recurring bugs</li><li>Improved architectural coherence over time</li><li>Developers who remain engaged, skilled participants in their systems rather than distant observers of AI-generated code</li></ul><p>The bug that takes longer to fix correctly is the bug that won’t recur. The fix that requires architectural thinking is the fix that improves the system. The test suite that validates real behavior is the test suite that catches future regressions.</p><p>Under Supervised Coding principles, debugging becomes not merely a response to failure but an investment in system quality and developer understanding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0311785a58fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/debugging-under-supervised-coding-principles-0311785a58fb">Debugging Under Supervised Coding Principles</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supervised Coding: A Proposed Paradigm for AI-Assisted Development]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/supervised-coding-a-proposed-paradigm-for-ai-assisted-development-8c4c8e811d2e?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c4c8e811d2e</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 15:32:01 GMT</pubDate>
            <atom:updated>2026-01-13T15:33:51.808Z</atom:updated>
            <content:encoded><![CDATA[<p>This story is meant to be free to access. Feel free to use this <a href="https://medium.com/@andrea.mariotti/supervised-coding-a-proposed-paradigm-for-ai-assisted-development-8c4c8e811d2e?source=friends_link&amp;sk=856a8b26579281234fb71f2bfd6f4f52">link</a> if you are not registered.</p><h3>Introduction</h3><p>As artificial intelligence transforms software development, we stand at a critical juncture. The promise of AI code generation is immense — accelerated development cycles, reduced boilerplate, and democratized access to programming. Yet this promise comes with peril: poorly understood code, accumulated technical debt, and the erosion of developer accountability. Supervised Coding emerges as a necessary framework to harness AI’s power while maintaining the integrity, quality, and responsibility that professional software development demands.</p><h3>The Challenge of AI-Generated Code</h3><p>The current landscape of AI-assisted development often resembles a Wild West: developers copy entire functions or modules from AI outputs, integrate them with minimal review, and ship code they don’t fully understand. This approach treats AI as a magical oracle rather than as a powerful tool requiring skilled operation. The consequences manifest as subtle bugs, security vulnerabilities, architectural inconsistencies, and systems that become progressively harder to maintain.</p><p>The fundamental problem is not the AI itself, but rather the absence of a disciplined methodology for its use. We need a framework that positions AI as what it truly is: an exceptionally capable assistant that requires expert supervision.</p><h3>Core Philosophy: The Developer as Supervisor</h3><p>Supervised Coding establishes the developer as the primary decision-maker and the AI as a supervised agent. This inverts the dangerous pattern where developers become mere conduits for AI output. Instead, the developer assumes the role of architect, reviewer, and quality gatekeeper — supervising the AI much as a senior engineer might supervise a junior team member.</p><p>This supervision is active, not passive. The developer doesn’t simply accept or reject AI suggestions wholesale; they engage in an iterative dialogue, refining requirements, critiquing designs, and ensuring each component aligns with broader architectural principles.</p><h3>Principle One: Incremental Development</h3><p>Supervised Coding mandates building one function at a time. This granularity serves multiple purposes. First, it keeps the scope manageable, allowing thorough review of each component. Second, it prevents the accumulation of misunderstandings — a flawed assumption in one function won’t cascade through dozens of others before detection. Third, it maintains developer comprehension; understanding a single function is tractable, while understanding an entire generated module may not be.</p><p>This incremental approach also facilitates better learning. As developers review each function, they internalize patterns, understand trade-offs, and build intuition about the codebase. They remain engaged participants rather than distant observers.</p><p>Special mention: read <a href="https://medium.com/software-engineering-for-the-real-world/best-practice-how-to-give-ai-agents-database-access-for-production-deployments-1c0f42766509">Best Practice: How to Safely Grant AI Agents Database Access for Production Deployments</a> for a proposed architectural framework on how to protect your persistence layer. This extends to code generation as well, I recommend you design the schema and use the incremental development principle to ensure that the generated code does not circumvent your design. At Scrybus we do not grant admin access to the coding agent and we strictly enforce encapsulation and data structures.</p><h3>Principle Two: Requirement Capture and Specification</h3><p>The quality of AI-generated code is bounded by the quality of its instructions. Supervised Coding places responsibility for requirements and specifications squarely on the developer and development team. This is not delegable to the AI.</p><p>Before any code generation begins, developers must articulate what needs to be built, why it needs to be built, and how it should behave. This discipline — already fundamental to good software engineering — becomes even more critical when working with AI. Vague requirements yield vague code; precise specifications yield precise implementations.</p><p>This principle acknowledges a truth about AI systems: they excel at execution given clear direction but cannot replace human judgment about what should be built or how it should serve user needs.</p><h3>Principle Three: Design Review and Iteration</h3><p>Perhaps the most distinctive aspect of Supervised Coding is the emphasis on design approval before implementation. Using AI in iterative design modes, developers collaborate with AI to explore design options, evaluate trade-offs, and iterate toward optimal solutions.</p><p>This design phase creates a crucial checkpoint. The developer reviews the proposed approach — data structures, algorithms, interfaces, error handling strategies — and provides feedback. The AI refines the design based on this feedback. Only when the developer is satisfied does implementation proceed.</p><p>This separation of design from implementation prevents a common pitfall: discovering architectural problems only after code is written. It also ensures the developer understands and endorses the approach, which is essential for maintainability.</p><h3>Principle Four: Developer Accountability</h3><p>Supervised Coding maintains an unwavering principle: developers are responsible for the code they ship, regardless of how it was written. This accountability cannot be transferred to the AI, the tool vendor, or anyone else.</p><p>This principle has profound implications. It means developers cannot hide behind “the AI wrote it” when bugs emerge. It means they must understand the code well enough to maintain, debug, and extend it. It means they must apply the same standards of review to AI-generated code as they would to code written by a colleague — or themselves.</p><p>This accountability drives the supervisory relationship. Because developers bear the consequences of failures, they have strong incentive to supervise carefully, review thoroughly, and ensure quality at every step.</p><h3>Principle Five: Comprehensive Testing</h3><p>Testing under Supervised Coding is not optional or deferred — it is integral to each development effort. Whether building a single function or a complex feature, unit tests accompany the implementation.</p><p>AI can generate these tests, but the same supervisory principles apply. Developers review test coverage, verify test quality, and ensure tests validate meaningful behaviors rather than merely achieving coverage metrics. AI-generated tests are supervised tests.</p><p>Moreover, Supervised Coding embraces AI for regression testing. As the codebase evolves, AI can generate additional tests to cover new scenarios, but always under developer supervision. This creates a virtuous cycle: supervised code development produces well-tested components, and supervised test generation provides ongoing quality assurance.</p><p>At Scrybus, each developer is responsible for both unit testing and regression testing. We maintain three development environments: development, staging, and production. This allows the engineering team to test new features in a safe environment that behaves exactly like production. We automate QA and we adopted a popular pull request code reviewing service that acts as the last gatekeeper. This has worked remarkably well, capturing non-obvious bugs and helping us enforce best coding practices.</p><h3>The Scrybus Case Study: Achieving 40x Productivity</h3><p>The practical power of Supervised Coding becomes evident through real-world implementation. At Scrybus, a team of fewer than ten developers achieved, at some point, a Developer Equivalent (DE) of 47 — a metric representing the productivity of 47 traditional developers — meaning their output matched what would traditionally require 47 developers working without AI assistance.</p><p>This was achieved for a short period of time during bootstrapping. You can expect to see numbers like this during the early phases of new product development, tapering down to a DE of 4 to 8. This is what we are seeing now that Scrybus has reached greater maturity.</p><p>This wasn’t achieved by abandoning quality or cutting corners. Rather, it resulted from rigorous application of Supervised Coding principles. The small team maintained control over architecture and design, captured requirements meticulously, reviewed every function, and ensured comprehensive testing. What changed was the speed of execution once decisions were made.</p><p>This case demonstrates that Supervised Coding isn’t merely about maintaining standards in the face of AI — it’s about unlocking a fundamentally new capability. Small, highly skilled teams can now tackle problems previously reserved for much larger organizations, provided they maintain discipline and rigor in how they supervise AI-generated code.</p><h3>The Cultural Shift</h3><p>Implementing Supervised Coding requires more than adopting a checklist; it demands a cultural shift in how development teams view AI tools. Teams must resist the temptation to treat AI as a shortcut to avoid thinking deeply about design. They must maintain discipline even when AI makes generating large amounts of code effortless.</p><p>This shift may initially feel like slowing down, but the long-term benefits are substantial: more maintainable codebases, fewer production issues, better knowledge transfer, and developers who remain skilled and engaged rather than atrophied from disuse. The Scrybus example shows that this discipline, far from constraining productivity, actually maximizes it.</p><h3>Conclusion</h3><p>Supervised Coding offers a mature framework for AI-assisted development — one that leverages AI’s strengths while mitigating its risks. It recognizes that the goal is not to remove developers from the process but to amplify their capabilities. By establishing clear principles around supervision, accountability, quality, and measurement, it charts a path toward a future where AI and human developers collaborate effectively, producing better software than either could create alone.</p><p>The Scrybus case study provides compelling evidence: with proper supervision, small teams can achieve the output of organizations an order of magnitude larger, without sacrificing quality or accumulating technical debt. This isn’t speculation — it’s demonstrated reality.</p><p>The choice before the software industry is clear: we can allow AI to erode development discipline and expertise, or we can embrace frameworks like Supervised Coding that elevate both our tools and our practices. The latter path is harder, but it is the only sustainable route to building the reliable, maintainable systems our world increasingly depends upon.</p><h3>A Note on Context and Scalability</h3><p>The Supervised Coding principles presented here were developed at Scrybus under conditions that most organizations cannot replicate. First, we built our platform from the ground up, which allowed us to make deliberate technology choices at every stage — selecting tools specifically to optimize our path from minimum viable product (MVP) to production-grade Software as a Service (SaaS). Second, Scrybus operates as a bootstrapped company, meaning our team faces no investor pressure or external timelines. This fundamental difference in organizational constraints shapes how we approach development.</p><p>In a bootstrapped environment, success depends entirely on customer adoption. This drives our product roadmap, which in turn determines feature prioritization, tool selection, and continuous benchmarking. Any process or tool that fails to deliver measurable value is discontinued immediately. Conversely, promising approaches can be piloted and implemented with minimal friction. This rapid feedback loop and ability to iterate without institutional inertia creates an environment quite unlike most enterprises.</p><p>These conditions enabled the development of our current practices, but they should be understood as contextual advantages rather than universal prescriptions. Organizations operating under different constraints — startup timelines, legacy systems, vendor commitments, or governance requirements — may need to adapt these principles accordingly.</p><p>That said, the principles of Supervised Coding can scale to larger organizations through a specific structural approach: dividing the organization into functional teams of five to eight members, each with complete ownership and autonomy over their mandate. This team-based model preserves the rapid feedback loops and decision-making speed that characterize our bootstrapped environment, while enabling growth beyond the constraints of a single small team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c4c8e811d2e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/supervised-coding-a-proposed-paradigm-for-ai-assisted-development-8c4c8e811d2e">Supervised Coding: A Proposed Paradigm for AI-Assisted Development</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Practice: How to Safely Grant AI Agents Database Access for Production Deployments]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/best-practice-how-to-give-ai-agents-database-access-for-production-deployments-1c0f42766509?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c0f42766509</guid>
            <category><![CDATA[healthcare]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[hipaa-compliance]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Mon, 28 Apr 2025 18:59:09 GMT</pubDate>
            <atom:updated>2025-04-28T19:02:58.466Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7lya1hhbWtvNGoxImhG0A.jpeg" /></figure><p>This story is mean to be available to all, fell free to use my friend link to read it <a href="https://medium.com/@andrea.mariotti/best-practice-how-to-give-ai-agents-database-access-for-production-deployments-1c0f42766509?source=friends_link&amp;sk=8e48d403e2ce4ee885cfe7d274c9deb0">here</a>.</p><h3>TL;DR</h3><p>Never grant an agent direct SQL access to a database unless the data is exclusively public.</p><p>If the data requires access control, enforce user role validation outside of the LLM.</p><h3>Introduction</h3><p>Almost every agentic framework today offers an easy-to-integrate database connector (often called a “tool” or “agent tool”). As a developer, it is easy to be impressed when you see your reactive agent autonomously generate SQL queries and extract data from your schema without any manual programming effort.</p><p>This capability is useful for demonstrations and might even be acceptable for an MVP (Minimum Viable Product). However, this approach is inappropriate for production environments. In this article, we explain why direct SQL access is risky and propose a best-practice pattern for safe database integration.</p><h3>Understanding the Problem</h3><p>At its core, a large language model (LLM) is a statistical, probabilistic system. It is inherently non-deterministic.</p><p>Although you can mitigate some risks through techniques like fine-tuning (e.g., LoRA), prompt engineering, temperature adjustments, and controlled seeding, you cannot eliminate the fundamental uncertainty. An LLM can never provide the hard business guarantees required in production systems — especially those serving paying customers or governed by Service Level Agreements (SLAs).</p><p>One major class of risk is <strong>hallucination</strong>: when the model confidently generates outputs that are logically or contextually incorrect.</p><p>For example, here is what a popular chat agent reports about research studies examining LLM hallucination rates:</p><blockquote>Hallucination rates in large language models (LLMs) vary across domains, with models like GPT-4 and GPT-4 Turbo generally performing better in general tasks (around 3–5%) but still prone to errors in more specialized fields. In legal contexts, hallucination rates can be as high as 88%, while in clinical decision-making, they range from 50–82%, even with mitigation strategies. The variability underscores the need for domain-specific fine-tuning and caution in deploying LLMs in high-stakes applications. Tailored approaches are essential to minimize hallucinations and ensure accuracy in critical areas like healthcare, law, and research.</blockquote><blockquote><a href="https://thehill.com/policy/technology/4403776-ai-models-frequently-hallucinate-on-legal-queries-study-finds/?utm_source=chatgpt.com">Stanford Legal Study</a></blockquote><blockquote><a href="https://arxiv.org/abs/2501.08292?utm_source=chatgpt.com">HALoGEN Benchmark</a></blockquote><blockquote><a href="https://www.33rdsquare.com/hallucinations-in-llms/?utm_source=chatgpt.com">33rd Square Survey</a></blockquote><blockquote><a href="https://github.com/obrienlabs/hallucination-leaderboardrd?utm_source=chatgpt.com">Hallucination Leaderboard</a></blockquote><blockquote><a href="https://www.medrxiv.org/content/10.1101/2025.03.18.25324184v1?utm_source=chatgpt.com">Clinical Decision Support Study</a></blockquote><p>Let us assume an optimistic scenario in which the hallucination rate is approximately 3%.</p><p>Now, consider building a naïve agent with direct access to a patient database, available to doctors, nurses, and other hospital staff. Suppose we attempt to control access solely through prompt engineering — instructing the agent to only respond if the logged-in user possesses the appropriate privileges.</p><p>It is important to emphasize that this is a <strong>critical design flaw</strong>, presented here purely for illustrative purposes. The following is an example of such a naïve implementation:</p><pre>from sqlalchemy import create_engine, MetaData, Table, Column, Integer, String, select<br>from sqlalchemy.orm import Session<br>from llama_index.llms.ollama import Ollama<br>from llama_index.agent import FunctionCallingAgent<br>from llama_index.tools import FunctionTool<br><br># 1. Setup SQLite Database<br>engine = create_engine(&quot;sqlite:///patients.db&quot;, echo=False)<br>metadata = MetaData()<br><br>users = Table(<br>    &quot;users&quot;, metadata,<br>    Column(&quot;id&quot;, Integer, primary_key=True),<br>    Column(&quot;username&quot;, String, unique=True, nullable=False),<br>    Column(&quot;role&quot;, String, nullable=False),<br>)<br><br>patients = Table(<br>    &quot;patients&quot;, metadata,<br>    Column(&quot;id&quot;, Integer, primary_key=True),<br>    Column(&quot;name&quot;, String, nullable=False),<br>    Column(&quot;provider_name&quot;, String, nullable=False),<br>    Column(&quot;condition&quot;, String, nullable=False),<br>)<br><br>metadata.create_all(engine)<br><br># 2. Pre-populate database (only if empty)<br>with Session(engine) as session:<br>    if session.query(users).count() == 0:<br>        session.execute(users.insert(), [<br>            {&quot;username&quot;: &quot;dr_smith&quot;, &quot;role&quot;: &quot;doctor&quot;},<br>            {&quot;username&quot;: &quot;nurse_johnson&quot;, &quot;role&quot;: &quot;nurse&quot;},<br>            {&quot;username&quot;: &quot;receptionist_amy&quot;, &quot;role&quot;: &quot;receptionist&quot;},<br>        ])<br>    if session.query(patients).count() == 0:<br>        session.execute(patients.insert(), [<br>            {&quot;name&quot;: &quot;John Doe&quot;, &quot;provider_name&quot;: &quot;Dr. Smith&quot;, &quot;condition&quot;: &quot;Flu&quot;},<br>            {&quot;name&quot;: &quot;Jane Roe&quot;, &quot;provider_name&quot;: &quot;Dr. Smith&quot;, &quot;condition&quot;: &quot;Diabetes&quot;},<br>            {&quot;name&quot;: &quot;Mary Major&quot;, &quot;provider_name&quot;: &quot;Dr. Brown&quot;, &quot;condition&quot;: &quot;Asthma&quot;},<br>        ])<br>    session.commit()<br><br># 3. Access Control Tool<br>AUTHORIZED_ROLES = {&quot;doctor&quot;, &quot;nurse&quot;}<br><br>def get_patient_record(logged_in_user: str, patient_id: int) -&gt; dict:<br>    &quot;&quot;&quot;Tool to get a patient record if user has access.&quot;&quot;&quot;<br>    with Session(engine) as session:<br>        user_query = select(users.c.role).where(users.c.username == logged_in_user)<br>        user_result = session.execute(user_query).fetchone()<br><br>        if user_result is None:<br>            return {&quot;error&quot;: &quot;Access denied: user not found&quot;}<br><br>        user_role = user_result[0]<br>        <br>        if user_role not in AUTHORIZED_ROLES:<br>            return {&quot;error&quot;: &quot;Access denied: insufficient privileges&quot;}<br><br>        patient_query = select(patients).where(patients.c.id == patient_id)<br>        patient_result = session.execute(patient_query).fetchone()<br><br>        if patient_result is None:<br>            return {&quot;error&quot;: &quot;Patient not found&quot;}<br><br>        return {<br>            &quot;id&quot;: patient_result.id,<br>            &quot;name&quot;: patient_result.name,<br>            &quot;provider_name&quot;: patient_result.provider_name,<br>            &quot;condition&quot;: patient_result.condition,<br>        }<br><br># 4. Register tool for agent<br>get_patient_record_tool = FunctionTool.from_defaults(<br>    fn=get_patient_record,<br>    name=&quot;get_patient_record&quot;,<br>    description=&quot;Retrieve patient information if user is authorized. Inputs are logged_in_user (str) and patient_id (int).&quot;,<br>)<br><br># 5. Setup Ollama LLM and Agent<br>llm = Ollama(model=&quot;llama3&quot;)  # Replace &quot;llama3&quot; with your local model if needed<br>agent = FunctionCallingAgent.from_tools(<br>    [get_patient_record_tool],<br>    llm=llm,<br>    system_prompt=&quot;You are a secure medical assistant. Always check if the user has permissions before accessing patient data.&quot;<br>)<br><br># 6. Agent example calls<br>if __name__ == &quot;__main__&quot;:<br>    # Simulated query<br>    response = agent.chat(&quot;Get me the patient record for patient ID 1. I am logged in as dr_smith.&quot;)<br>    print(response)<br><br>    response = agent.chat(&quot;Get me the patient record for patient ID 2. I am logged in as receptionist_amy.&quot;)<br>    print(response)</pre><p>This agent will respond to the logged-in user, but approximately 3% of the time, it will fail to enforce role-based access control. Furthermore, the agent has no intrinsic capability to verify whether the user is legitimate or malicious — for instance, a non-authorized user impersonating a doctor.</p><p>Under this design, approximately 3 out of every 100 queries would result in a HIPAA violation.</p><h3>Proposed Best Practice</h3><p>Recognizing that large language models are inherently statistical systems, we must apply sound engineering practices and externalize role enforcement from the model itself.</p><p>In the recommended design, the LLM interacts only with tools that have already verified user authentication and authorization. It does not rely on prompt engineering or an honor system.</p><p>Specifically, the database engine is wrapped in an access-controlled object that embeds the logged-in user’s identity. Regardless of what the LLM outputs, this wrapper consistently enforces access control policies based on the authenticated user’s permissions.</p><pre>from sqlalchemy import create_engine, MetaData, Table, Column, Integer, String, select<br>from sqlalchemy.orm import Session<br>from llama_index.llms.ollama import Ollama<br>from llama_index.agent import FunctionCallingAgent<br>from llama_index.tools import FunctionTool<br><br># 1. Setup SQLite Database<br>engine = create_engine(&quot;sqlite:///patients.db&quot;, echo=False)<br>metadata = MetaData()<br><br># Define tables<br>users = Table(<br>    &quot;users&quot;, metadata,<br>    Column(&quot;id&quot;, Integer, primary_key=True),<br>    Column(&quot;username&quot;, String, unique=True, nullable=False),<br>    Column(&quot;role&quot;, String, nullable=False),<br>)<br><br>patients = Table(<br>    &quot;patients&quot;, metadata,<br>    Column(&quot;id&quot;, Integer, primary_key=True),<br>    Column(&quot;name&quot;, String, nullable=False),<br>    Column(&quot;provider_name&quot;, String, nullable=False),<br>    Column(&quot;condition&quot;, String, nullable=False),<br>)<br><br>metadata.create_all(engine)<br><br># Pre-populate database (only if empty)<br>with Session(engine) as session:<br>    if session.query(users).count() == 0:<br>        session.execute(users.insert(), [<br>            {&quot;username&quot;: &quot;dr_smith&quot;, &quot;role&quot;: &quot;doctor&quot;},<br>            {&quot;username&quot;: &quot;nurse_johnson&quot;, &quot;role&quot;: &quot;nurse&quot;},<br>            {&quot;username&quot;: &quot;receptionist_amy&quot;, &quot;role&quot;: &quot;receptionist&quot;},<br>        ])<br>    if session.query(patients).count() == 0:<br>        session.execute(patients.insert(), [<br>            {&quot;name&quot;: &quot;John Doe&quot;, &quot;provider_name&quot;: &quot;Dr. Smith&quot;, &quot;condition&quot;: &quot;Flu&quot;},<br>            {&quot;name&quot;: &quot;Jane Roe&quot;, &quot;provider_name&quot;: &quot;Dr. Smith&quot;, &quot;condition&quot;: &quot;Diabetes&quot;},<br>            {&quot;name&quot;: &quot;Mary Major&quot;, &quot;provider_name&quot;: &quot;Dr. Brown&quot;, &quot;condition&quot;: &quot;Asthma&quot;},<br>        ])<br>    session.commit()<br><br># 2. Engine Wrapper with Access Control<br>AUTHORIZED_ROLES = {&quot;doctor&quot;, &quot;nurse&quot;}<br><br>class DatabaseAccessWrapper:<br>    &quot;&quot;&quot;Wrapper around database to enforce user-based access control.&quot;&quot;&quot;<br><br>    def __init__(self, user_id: str):<br>        self.user_id = user_id<br><br>    def get_user_role(self):<br>        with Session(engine) as session:<br>            user_query = select(users.c.role).where(users.c.username == self.user_id)<br>            user_result = session.execute(user_query).fetchone()<br>            if user_result is None:<br>                return None<br>            return user_result[0]<br><br>    def get_patient_record(self, patient_id: int) -&gt; dict:<br>        user_role = self.get_user_role()<br>        if user_role is None:<br>            return {&quot;error&quot;: &quot;Access denied: user not found&quot;}<br>        if user_role not in AUTHORIZED_ROLES:<br>            return {&quot;error&quot;: &quot;Access denied: insufficient privileges&quot;}<br>        <br>        with Session(engine) as session:<br>            patient_query = select(patients).where(patients.c.id == patient_id)<br>            patient_result = session.execute(patient_query).fetchone()<br><br>            if patient_result is None:<br>                return {&quot;error&quot;: &quot;Patient not found&quot;}<br><br>            return {<br>                &quot;id&quot;: patient_result.id,<br>                &quot;name&quot;: patient_result.name,<br>                &quot;provider_name&quot;: patient_result.provider_name,<br>                &quot;condition&quot;: patient_result.condition,<br>            }<br><br># 3. Define the tool for the agent<br># Notice: now the wrapper instance must be created **before** using the tool.<br><br>def make_get_patient_record_tool(wrapper: DatabaseAccessWrapper):<br>    &quot;&quot;&quot;Create a tool instance bound to a specific user wrapper.&quot;&quot;&quot;<br>    return FunctionTool.from_defaults(<br>        fn=wrapper.get_patient_record,<br>        name=&quot;get_patient_record&quot;,<br>        description=&quot;Retrieve patient information if user is authorized. Input is patient_id (int).&quot;,<br>    )<br><br># 4. Setup Ollama LLM and Agent<br>llm = Ollama(model=&quot;llama3&quot;)  # or whatever local model you use<br><br>def create_agent_for_user(user_id: str) -&gt; FunctionCallingAgent:<br>    &quot;&quot;&quot;Create an agent instance tied to a user session.&quot;&quot;&quot;<br>    wrapper = DatabaseAccessWrapper(user_id)<br>    patient_record_tool = make_get_patient_record_tool(wrapper)<br><br>    agent = FunctionCallingAgent.from_tools(<br>        [patient_record_tool],<br>        llm=llm,<br>        system_prompt=f&quot;You are a secure medical assistant. You are logged in as {user_id}.&quot;,<br>    )<br>    return agent<br><br># 5. Example Usage<br>if __name__ == &quot;__main__&quot;:<br>    agent_dr_smith = create_agent_for_user(&quot;dr_smith&quot;)<br>    agent_receptionist = create_agent_for_user(&quot;receptionist_amy&quot;)<br>    <br>    print(agent_dr_smith.chat(&quot;Get the patient record for patient ID 3.&quot;))  # Will succeed<br>    print(agent_receptionist.chat(&quot;Get the patient record for patient ID 3.&quot;))  # Will fail</pre><p>In this example, any attempt by Amy, the receptionist, to access patient information will be denied, regardless of the response the LLM might attempt to generate in reaction to her request.</p><h3>Conclusion</h3><p>While agent-based architectures offer powerful capabilities for interacting with databases and other structured information sources, production environments demand a significantly higher standard of safety and reliability.</p><p>Because large language models are inherently non-deterministic and cannot guarantee consistent behavior, critical security measures — such as role-based access control — must be enforced outside the model itself. By encapsulating authorization logic at the tool or infrastructure level, developers can ensure that data access is consistently validated, regardless of the model’s behavior.</p><p>Following this best practice is essential not only for maintaining data integrity and compliance (e.g., HIPAA) but also for building trustworthy AI systems that can be safely deployed in real-world, high-stakes environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c0f42766509" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/best-practice-how-to-give-ai-agents-database-access-for-production-deployments-1c0f42766509">Best Practice: How to Safely Grant AI Agents Database Access for Production Deployments</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Privacy with AI Chat Agents]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/understanding-privacy-with-ai-agents-9d38c84930f3?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d38c84930f3</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Fri, 18 Apr 2025 17:50:42 GMT</pubDate>
            <atom:updated>2025-04-18T17:54:37.433Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rPin00myPrbY1ZnPZjAACg.png" /></figure><p>This story is published in the public domain, you can use this link to read it <a href="https://medium.com/@andrea.mariotti/9d38c84930f3?source=friends_link&amp;sk=e47452358231bbf44f752f4cd7889804">https://medium.com/@andrea.mariotti/9d38c84930f3?source=friends_link&amp;sk=e47452358231bbf44f752f4cd7889804</a></p><p>Privacy is a primary concern for many individuals, particularly in our current age where artificial intelligence (AI) powered virtual agents are prevalent. To ensure your privacy while interacting with these systems, it’s crucial to understand how they operate and the potential risks involved.</p><p>At the highest level, Chat Agents use Large Language Models (LLMs) to understand and respond to user inquiries. LLMs can be computationally intensive, especially during training, but their inference capabilities have become more accessible. In English, most of these models run on servers, some can run on your machine and eventually, on your mobile.</p><p>To give you a better understanding of where your data is flowing, there are several key components involved:</p><p>1. Chat UI (User Interface): This could be an app or web-based interface through which users interact with the AI.<br>2. A cloud to which this UI connects: This can either be an intermediary or a direct call to the actual LLM provider.</p><p>By examining these points, you can get an idea of where your data might potentially be used:</p><p>1. The hosting company’s server: This could be an intermediary or directly connected to the AI service.<br>2. An additional intermediary cloud service.</p><p>As for potential risks, it is essential to acknowledge that multiple parties may have access to your data during these processes.</p><p>To ensure protection:<br>1. Carefully read the privacy policies of the services you use.<br>2. If possible, use incognito or private browsing modes when interacting with these services.<br>3. Be selective about the information provided, only sharing what is necessary and assume it is being used by the service provider unless explicitly excluded.</p><p>While protecting privacy may seem challenging in an AI-driven era, it’s crucial to stay informed and take appropriate measures accordingly.</p><h3>Only-the-paranoid-survive Approach.</h3><p>So what can you do if you <strong>do</strong> want a private experience using an AI Chat Agent. One option is to download <a href="http://lmstudio.ai/">LM Studio</a> and use it instead of other Apps. Their privacy policy clearly states that the data never leaves your machine as the LLM (agent) is running locally.</p><h3>Final remarks</h3><p>Please check with your employer on what their policies are with respect to using chat agents. Most Fortune 1000 provide a behind the firewall AI Chat Agent for employees that you are allowed to use for your work. Of course, if you use your employer’s chat agent for personal use and your based in the US, be aware that your employer will have access to your conversations.</p><h3>TL DR</h3><p>In simple terms, the same concerns that apply when using a search engine like Google applies to using Chat Agents.</p><p>To run chat locally and maintain privacy, install <a href="https://lmstudio.ai/">LM Studio</a> to have a UI experience similar to the best of breed but still safe as it runs locally and it is an open source project.</p><blockquote>Final comments.</blockquote><blockquote>I have zero affiliation with LM Studio. The information in this post is shared for educational purpose only. I personally run LLMs locally using Ollama (see ollama.com) and I built my own chat agent and UI.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d38c84930f3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/understanding-privacy-with-ai-agents-9d38c84930f3">Understanding Privacy with AI Chat Agents</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Force Multiplier AGI: a pragmatic approach to generative AI.]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/force-multiplier-agi-a-pragmatic-approach-to-generative-ai-24b960d87200?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/24b960d87200</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[future]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Fri, 24 Jan 2025 20:22:30 GMT</pubDate>
            <atom:updated>2025-01-27T20:15:45.971Z</atom:updated>
            <content:encoded><![CDATA[<h4>How lesson learned from self driving can shape the future of generative AI.</h4><blockquote>If you’re not a Medium member, you can still read this story using my Friend Link: <a href="https://medium.com/software-engineering-for-the-real-world/force-multiplier-agi-a-pragmatic-approach-to-generative-ai-24b960d87200?source=friends_link&amp;sk=5cab25ed0991edc37b945b64faf05ed5">link</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*RIGVJcwOk2ls3gkhsuZgkQ.jpeg" /></figure><p>First, let’s define AGI (Artificial General Intelligence) in the context of this discussion, as it can be a broad concept: AGI refers to a system capable of understanding, learning, and applying knowledge to one or more tasks at a human level or beyond. Additionally, let’s agree that such a system requires training, which can vary significantly depending on the domain (e.g., an automotive technician versus a medical doctor). Once trained, an AGI agent is expected to require minimal to no supervision.</p><p><strong>Minimal to no supervision: this is the core issue.</strong></p><p>This challenge mirrors the problem faced by self-driving technology. I will use it as an example to illustrate the concept of <strong>Force Multiplier</strong> and how it can be applied to AGI.</p><p>The AI used in self-driving systems struggles with edge cases — uncommon or unpredictable situations where the system cannot develop an appropriate strategy. These edge cases often lead to either a controlled stop or, in worse scenarios, a collision.</p><p>Currently, all operational self-driving platforms incorporate a “human-in-the-loop” approach to handle edge cases. In other words, they rely on supervised autonomy. The frequency of human intervention directly impacts the profitability of these ventures. However, this human-supervised approach is what enables self-driving companies to operate today. The self-driving technology does not replace the human (driver), it moves the human from the vehicle to a remote location where it can supervise multiple self driving vehicles. This is the multiplier effect.</p><p>AGI are based, mostly, on transformers. Please see <a href="https://medium.com/software-engineering-for-the-real-world/when-and-why-to-use-cnn-rnn-and-transformers-genai-8e6f0436289f">When and Why to use CNN, RNN and Transformers (GenAI).</a></p><p>Incidentally, self-driving technology leverages CNNs (Convolutional Neural Networks), RNNs (Recurrent Neural Networks), and, more recently, transformers. I expect transformers to play an even bigger role now that smaller models can be deployed at the edge. While this development has helped — and will continue to help — address the limitations of CNNs and RNNs, it’s essentially just kicking the can down the road. By the end of this article, this point will become clear.</p><p>As I mentioned in the blog post above, the primary issue with transformers is <strong>hallucinations</strong>. To illustrate this, I will use the example of detecting a traffic light.</p><p>Hallucinations can be categorized as follows:</p><p>1. <strong>Factual Hallucination</strong>: The transformer generates something that seems plausible but is entirely fabricated.</p><p>• Example: “The traffic light is red” when in reality, there is no traffic light.</p><p>2. <strong>Contextual Hallucination</strong>: The transformer produces an output that is off-topic or nonsensical.</p><p>• Example: “The traffic light tastes like mozzarella.” I am exaggerating to the absurd here but you get the point and, hopefully, a laugh too.</p><p>3. <strong>Logical Hallucination</strong>: The transformer generates something contradictory or illogical within the context.</p><p>• Example: “The traffic light is white.”</p><p>CNNs and RNNs have their own limitations, such as false positives and false negatives:</p><p>• <strong>False Positive</strong>: The AI mistakenly identifies a red light when in fact it is a tree branch.</p><p>• <strong>False Negative</strong>: The AI fails to detect the traffic light altogether or it classifies it as something else thus not returning a traffic light color detection.</p><p>Both scenarios can lead to accidents.</p><p>The solution has been to keep a human in the loop as the ultimate judgment system. Elaborating on exactly how that works would require a lengthy blog post of its own. Let’s just agree that supervised autonomy has been broadly adopted.</p><p>I predict that AGI will require a similar approach in both the immediate and foreseeable future but first let’s talk about the limitations of the current approach.</p><p><strong>Addressing Hallucinations</strong></p><p>Various methods have been implemented to mitigate hallucinations, including:</p><p>• <strong>Retrieval-Augmented Generation (RAG)</strong></p><p>• <strong>Cached RAG</strong></p><p>• <strong>Reinforcement Learning</strong></p><p>New approaches are introduced nearly every week. These techniques have contributed to reducing the frequency of factual, contextual, and logical hallucinations. However, this still amounts to kicking the can down the road. The difference now is that we’re kicking it much farther down the road. Generative AI solutions are becoming increasingly accurate, and the range of tasks they can perform effectively continues to grow.</p><p><strong>Force Multiplier AGI</strong></p><p>I believe the best way to build products using this technology is to design them with <strong>human supervision by default</strong>. Note that this isn’t about supervised learning but rather a <strong>UI/UX paradigm</strong> in which AGI is intentionally used to augment human capabilities. The military refers to this approach as a <strong>force multiplier</strong>.</p><p>Force Multiplier AGI is the solution.</p><p>While this paradigm will make certain jobs obsolete, it will also augment others or create new ones. I plan to write another blog soon, detailing a “recipe” to attempt to predict which jobs will disappear and which will evolve. Stay tuned.</p><p><strong>Practical Examples</strong></p><p>A concrete example of how Force Multiplier AGI will shape the future is in software development, but this principle could just as easily apply to CAD, CAE, circuit design, and many other STEM fields. I predict that the role of a software developer, as we know it today, will vanish. In its place, roles such as <strong>software architect</strong> and <strong>product manager</strong> will evolve and flourish. Someone has to tell the AGI in details <em>what</em> to build and, in certain cases, <em>how</em>. The act of building (writing code) can and will be automated more and more. The act of deciding what to build and how it is, for the next several years, still the domain of humans. A force multiplier approach is a practical way forwards.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24b960d87200" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/force-multiplier-agi-a-pragmatic-approach-to-generative-ai-24b960d87200">Force Multiplier AGI: a pragmatic approach to generative AI.</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When and Why to use CNN, RNN and Transformers (GenAI).]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/when-and-why-to-use-cnn-rnn-and-transformers-genai-8e6f0436289f?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e6f0436289f</guid>
            <category><![CDATA[gen-ai-for-business]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Mon, 06 Jan 2025 21:07:28 GMT</pubDate>
            <atom:updated>2025-01-27T20:15:23.439Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jscK4DQnNfzv5mkD1jXN9g.png" /></figure><blockquote>If you’re not a Medium member, you can still read this story using my Friend Link: <a href="https://medium.com/software-engineering-for-the-real-world/when-and-why-to-use-cnn-rnn-and-transformers-genai-8e6f0436289f?source=friends_link&amp;sk=04598695e0ac025fcf86fa5c909a7201">link</a></blockquote><p>With the growing buzz around GPTs, LLMs, and Generative AI (GenAI), it’s easy for non-experts to get lost in the terminology. What does AI really mean in practical terms? In this context, we’ll simplify things by focusing on three core types of artificial intelligence algorithms that mimic tasks the human brain performs: <strong>CNN</strong>, <strong>RNN</strong>, and <strong>Transformers</strong>. We’ll briefly explain what each of these models is, how they work, and what they are best suited for.</p><p>If you’re short on time, feel free to <strong>jump to the Key Takeaways</strong> section for a quick summary.</p><h3>How do CNN work*</h3><p>Convolutional Neural Networks (CNNs) are specialized deep learning models designed primarily for processing data with grid-like structures, such as images. They use layers that apply convolutional operations to extract features from input data. Here’s a breakdown of how CNNs work:</p><p><strong>1. Structure of CNNs</strong></p><p>A typical CNN consists of the following layers:</p><p><strong>a. Input Layer</strong></p><p>Takes raw image data (e.g., a matrix of pixel values) as input. For a colored image, it uses multiple channels (e.g., RGB has 3 channels).</p><p><strong>b. Convolutional Layer</strong></p><p><strong>Purpose</strong>: Detects local patterns in the image (edges, textures, shapes).</p><p><strong>Operation</strong>:</p><p>Applies a set of filters (kernels) that slide over the input data. Each filter computes a dot product between its weights and a patch of input. Then each filter generates a feature map (a transformed version of the input emphasizing specific patterns).</p><p><strong>Example</strong>: A 3x3 filter scans an image to detect vertical edges.</p><p><strong>c. Activation Function (ReLU)</strong></p><p><strong>Purpose</strong>: Introduces non-linearity to allow the model to learn complex patterns.</p><p><strong>Operation</strong>: ReLU (Rectified Linear Unit) replaces negative values with zero while leaving positive values unchanged.</p><p><strong>d. Pooling Layer</strong></p><p><strong>Purpose</strong>: Reduces the spatial dimensions of feature maps, decreasing computation and helping prevent overfitting.</p><p><strong>Operation by Type</strong>:</p><ul><li><strong>Max Pooling Type</strong>: Takes the maximum value in each region.</li><li><strong>Average Pooling Type</strong>: Computes the average of values in each region.</li></ul><p><strong>Example</strong>: A 2x2 max pooling layer reduces a 4x4 feature map to 2x2 by taking the largest value in each 2x2 block.</p><p><strong>e. Fully Connected (Dense) Layer</strong></p><p><strong>Purpose</strong>: Connects all neurons, integrating high-level features learned by convolutional layers.</p><p><strong>Operation</strong>: Flattens the feature maps into a vector for classification or regression.</p><p><strong>f. Output Layer</strong></p><p><strong>Purpose</strong>: Produces final predictions.</p><p><strong>Common Output Activation</strong>:</p><ul><li><strong>Softmax</strong> for multi-class classification.</li><li><strong>Sigmoid</strong> for binary classification.</li></ul><p><strong>2. How CNNs Process an Image</strong></p><p><strong>Step 1: Convolution</strong></p><p>Filters scan the input image, producing feature maps that highlight specific patterns (edges, curves).</p><p><strong>Step 2: Activation</strong></p><p>The ReLU function is applied to the feature maps to introduce non-linearity.</p><p><strong>Step 3: Pooling</strong></p><p>Feature maps are downsampled to reduce size and computation.</p><p><strong>Step 4: Repeat Layers</strong></p><p>Multiple convolution, activation, and pooling layers are stacked to learn hierarchical features.</p><p><strong>Step 5: Classification (Fully Connected)</strong></p><p>Flattened feature maps are processed by fully connected layers, and a prediction is made using the final activation function.</p><p><strong>Illustrative Example</strong></p><p>An image of a cat is passed into the CNN.</p><p>Early convolutional layers detect basic shapes (e.g., edges of the cat’s ears).</p><p>Deeper layers recognize more complex features (e.g., the eyes, fur patterns).</p><p>The fully connected layers integrate the features and output the probability that the image is of a cat.</p><h3>How do RNN work*</h3><p>Recurrent Neural Networks (RNNs) are a class of neural networks designed to handle <strong>sequential data</strong>. Unlike traditional feedforward neural networks, RNNs have loops that allow them to maintain <strong>memory of previous inputs</strong> while processing new data, making them suitable for tasks like time series analysis, natural language processing, and speech recognition.</p><p><strong>Structure of RNNs</strong></p><p>An RNN consists of:</p><ul><li><strong>Input Layer</strong>: Takes sequential input data (e.g., words in a sentence or time-series data points).</li><li><strong>Hidden Layer(s)</strong>: Contains neurons with recurrent connections that loop back on themselves.</li><li><strong>Output Layer</strong>: Generates predictions or classifications based on the processed sequence.</li></ul><p>The key to how RNNs work is <strong>recurrence</strong> — they maintain a hidden state that carries information from one step to the next.</p><p><strong>How RNNs Process Data</strong></p><p>For a sequence of inputs:</p><p><strong>Step 1: Initialize the Hidden State</strong></p><p>The initial hidden state is set to zero or a predefined value.</p><p><strong>Step 2: Process Each Input</strong></p><p>At each time step the RNN takes the current input and the previous hidden state. Then the hidden state is updated using a function with weights and bias terms.</p><p>3. <strong>Step 3: Generate Output</strong></p><p>The output depends on the current hidden state above and it computes the value of a function based on weights, bias and an activation function like softmax or sigmoid.</p><p><strong>Step 4: Pass Hidden State Forward</strong></p><p>The updated hidden state is passed to the next time step, allowing the RNN to remember information from previous steps.</p><p><strong>Illustrative Example</strong></p><p>If processing a sentence “The cat sat on the mat.” Each of the words “The,” “cat,” etc. are component of the input vector. Each generates a hidden state. Each hidden state carries context from one word to the next, enabling the network to understand how words relate to each other.</p><h3>How do Transformers work*</h3><p>Transformers are a type of deep learning model designed to process sequential data, such as natural language, using a mechanism called <strong>self-attention</strong>. Unlike Recurrent Neural Networks (RNNs), transformers process all input tokens simultaneously, making them highly efficient for parallel computation. Transformers are widely used in natural language processing (NLP) tasks, such as translation, text generation, and question answering.</p><p><strong>Key Components of a Transformer</strong></p><p>The transformer architecture consists of two main parts: an <strong>encoder</strong> and a <strong>decoder</strong>.</p><p>1. <strong>Encoder</strong>: Maps input sequences to a sequence of hidden states.</p><p>2. <strong>Decoder</strong>: Maps hidden states to an output sequence (used for tasks like translation).</p><p>A transformer typically contains <strong>multiple layers</strong> of encoders and decoders stacked together.</p><p>Words or tokens are first converted into vectors using embedding layers. Since transformers do not have a sequential processing mechanism like RNNs, they add positional encoding to embeddings to capture the order of tokens in the sequence.</p><p><strong>Self-Attention Mechanism</strong></p><p>The core of the transformer is self-attention, where each word “attends” to all other words in a sentence:</p><ul><li><strong>Query, Key, Value Vectors</strong>: Each input token is transformed into these vectors using learned weight matrices.</li><li><strong>Attention Score</strong>: The dot product of query and key vectors determines how much attention a token pays to others.</li><li><strong>Weighted Sum</strong>: Attention scores are used to compute a weighted sum of value vectors, capturing contextual information.</li></ul><p><strong>Multi-Head Attention</strong></p><p>Instead of computing attention once, multiple attention heads allow the model to learn different types of relationships in parallel. Each head performs attention independently, and their results are concatenated.</p><p><strong>Advantages and Disadvantages of Transformers</strong></p><ul><li><strong>Parallelism</strong>: Unlike RNNs, transformers process all tokens simultaneously, leading to faster training.</li><li><strong>Long-Range Dependencies</strong>: Self-attention captures global relationships between tokens, making transformers effective for large contexts.</li><li><strong>Scalability</strong>: Transformers scale well with data and computational resources.</li><li><strong>Computational Cost</strong>: Self-attention requires quadratic complexity in sequence length, making transformers expensive for very long sequences.</li><li><strong>Data Hunger</strong>: Large transformers like GPT-3 require massive datasets and computational power.</li></ul><p><strong>Illustrative Example</strong></p><p>You type the question: <strong>“What is the capital of France?” The following token are generated: </strong>[“What”, “is”, “the”, “capital”, “of”, “France”, “?”]. The self attention mechanism extract the concept that you are looking for the capital of France. The decoder generates the output by using the learned patterns and it generates each token by predicting the next token in the sequence: “The” “Capital” “of” “France” “is” “Paris”.</p><h3>Key Takeaways</h3><p>Each model excels in specific scenarios. You can combine them to create custom solutions depending on your problem space. For instance, using a sequence of CNNs could mimic an RNN for processing image sequences. However, this approach would be computationally expensive since CNNs scan inputs in slices, requiring a strategy to concatenate outputs. On the other hand, Transformers extend beyond language processing, but their high computational demands make training resource-intensive. Efficient inference may require specialized hardware for edge or mobile deployment.</p><h3>Cheat Sheet and Conclusions</h3><p>CNN</p><ul><li>Great for image tasks</li><li>Requires large datasets</li><li>Image recognition, Object detection</li></ul><p>RNN</p><ul><li>Good for sequential data</li><li>Slow due to sequential processing</li><li>NLP, time-series data, speech modeling</li></ul><p>Transformer</p><ul><li>Fast and handles long dependencies</li><li>High memory usage, needs large datasets (note: at CES 2025 mini model have been announced, more on this in another post).</li><li>generative AI (text, images etc.)</li></ul><h4><strong>The Big Deal About Generative AI, Explained Simply</strong></h4><p>Transformers can learn the structure of virtually any vector space, not just language. This flexibility enables them to generate images, even though they were originally designed for text. Imagine training a transformer on sailboat control data — wind direction, wave height, rudder position, and more — it could learn how to sail. Similarly, Transformers can learn to drive, fly, walk, or write, making them incredibly powerful tools for automation and artificial intelligence.</p><p>(*) The sections with an asterisk where generated with the assistance of LLMs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e6f0436289f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/when-and-why-to-use-cnn-rnn-and-transformers-genai-8e6f0436289f">When and Why to use CNN, RNN and Transformers (GenAI).</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Engineering Levels]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/software-engineering-levels-8e2910457589?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e2910457589</guid>
            <category><![CDATA[sofware-development]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 22:04:46 GMT</pubDate>
            <atom:updated>2025-01-27T20:17:03.126Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ky-643vrfJ3jo58SlfmiXQ.jpeg" /></figure><blockquote><em>If you’re not a Medium member, you can still read this story using my Friend Link: </em><a href="https://medium.com/software-engineering-for-the-real-world/software-engineering-levels-8e2910457589?source=friends_link&amp;sk=cd72bed926b0925de762aa392fbcb65f"><em>link</em></a></blockquote><p>One of the recurring challenges as a tech lead is introducing clarity in the various aspects of day-to-day software engineering activities. Among these, a clear definition of roles and responsibilities at different levels of expertise is often overlooked.</p><p>This guide provides a breakdown of engineering levels, particularly suited to startups and SMBs. In larger corporations, additional layers may be required to support measurable career progression. For example, a “Software Engineer” title might include several sub-levels before promotion to “Senior Software Engineer.” However, the principles here are broadly applicable to organizations of any size and even adjacent engineering disciplines.</p><p>To make the discussion more concrete, I’ll use examples drawn from the context of self driving, an area of expertise of mine.</p><p><strong>How This is Organized</strong></p><p>This guide focuses on <strong>five key dimensions</strong> for each level:</p><p>1. <strong>Experience</strong> (at the time of promotion)</p><p>2. <strong>Skills</strong></p><p>3. <strong>Responsibilities</strong></p><p>4. <strong>Leadership</strong></p><p>5. <strong>Impact</strong></p><h3><strong>Individual Contributor Track</strong></h3><p><strong>Intern</strong></p><p>• <strong>Experience</strong>: 0 years</p><p>• <strong>Skills</strong>: Basic coding skills in at least one programming language.</p><p>• <strong>Responsibilities</strong>: Contribute to a non-critical, short-scope project ancillary to the main engineering objectives.</p><p>• Example: Integrate a new camera sensor, demonstrate basic machine vision performance, and produce a playbook for its use.</p><p>• <strong>Leadership</strong>: Requires daily mentorship and supervision.</p><p>• <strong>Impact</strong>: Limited to team-level contributions.</p><p><strong>Junior Engineer</strong></p><p>• <strong>Experience</strong>: 0 years</p><p>• <strong>Skills</strong>: Proficient in algorithms and intermediate to advanced coding in one language. Refining design and testing skills.</p><p>• <strong>Responsibilities</strong>: Produce high-quality code, participate in design discussions, and assist in requirements gathering.</p><p>• Example: Co-design and implement a production-ready camera driver.</p><p>• <strong>Leadership</strong>: Requires regular mentoring, decreasing over time.</p><p>• <strong>Impact</strong>: Production-level contribution with supervision.</p><p><strong>Software Engineer</strong></p><p>• <strong>Experience</strong>: 2–3 years</p><p>• <strong>Skills</strong>: Advanced coding and algorithmic skills; starting to think in terms of architecture.</p><p>• <strong>Responsibilities</strong>: Own a well-defined feature or subcomponent end-to-end. Write maintainable, high-quality code adhering to best practices.</p><p>• Example: Build a production-level object detection module with clear interfaces for integration.</p><p>• <strong>Leadership</strong>: Can independently manage small projects.</p><p>• <strong>Impact</strong>: Team-level contributions with organizational visibility.</p><p><strong>Senior Software Engineer</strong></p><p>• <strong>Experience</strong>: 5–7 years</p><p>• <strong>Skills</strong>: Proficient in software architecture, design, and processes. Recognized as a subject matter expert internally.</p><p>• <strong>Responsibilities</strong>: Lead the design and delivery of complex systems, mentor team members, and contribute to the engineering roadmap.</p><p>• Example: Design a machine vision module that fuses multiple inputs and leads its production deployment.</p><p>• <strong>Leadership</strong>: Can manage complex projects with minimal supervision.</p><p>• <strong>Impact</strong>: Significant contributions with cross-team influence.</p><p><strong>Staff Software Engineer/Software Architect</strong></p><p>• <strong>Experience</strong>: 10+ years</p><p>• <strong>Skills</strong>: Recognized subject matter expert contributing to organizational strategy.</p><p>• <strong>Responsibilities</strong>: Lead company-wide initiatives, solve complex technical challenges, and mentor senior engineers.</p><p>• Example: Oversee the lifecycle of a machine vision pipeline for an autonomous vehicle.</p><p>• <strong>Leadership</strong>: Shapes technical vision and company standards.</p><p>• <strong>Impact</strong>: Company-wide visibility and influence; public technical representation.</p><p><strong>Principal Software Engineer</strong></p><p>• <strong>Experience</strong>: 15+ years</p><p>• <strong>Skills</strong>: Sets and contributes to company-wide technical vision. Recognized industry expert.</p><p>• <strong>Responsibilities</strong>: Lead organizational technical strategy, solve the most challenging problems, and define long-term direction.</p><p>• Example: Spearhead the design and development of core machine vision platforms across product lines.</p><p>• <strong>Leadership</strong>: Manages critical projects across multiple teams; mentors the organization.</p><p>• <strong>Impact</strong>: Long-term, company-wide influence on technical and product roadmaps.</p><h3><strong>Management Track</strong></h3><p><strong>Engineering Manager / Lead Engineer</strong></p><p>• <strong>Experience</strong>: 5+ years</p><p>• <strong>Skills</strong>: Equivalent to Senior Software Engineer with added leadership and team management expertise.</p><p>• <strong>Responsibilities</strong>: Lead and oversee a team to deliver well-defined scopes of work.</p><p>• Example: Manage the team building an object detection module and related systems.</p><p>• <strong>Leadership</strong>: Manages up to 7 direct reports.</p><p>• <strong>Impact</strong>: Influences team and product outcomes.</p><p>(<em>Note</em>: Lead Engineers typically do not handle HR responsibilities and may transition to either management or staff engineering roles.)</p><p><strong>Director of Engineering</strong></p><p>• <strong>Experience</strong>: 8+ years</p><p>• <strong>Skills</strong>: Proficient in cross-functional collaboration, strategy, and process scaling.</p><p>• <strong>Responsibilities</strong>: Align technical efforts across teams, remove blockers, and scale best practices.</p><p>• <strong>Leadership</strong>: Manages managers or leads cross-organizational initiatives.</p><p>• <strong>Impact</strong>: Shapes product and technology strategy with senior leadership visibility.</p><p><strong>Vice President of Engineering</strong></p><p>• <strong>Experience</strong>: 10+ years</p><p>• <strong>Skills</strong>: External thought leader, adept at aligning engineering efforts with market and business strategies.</p><p>• <strong>Responsibilities</strong>: Define and execute product and technology roadmaps, manage large teams, and represent engineering at the executive level.</p><p>• <strong>Leadership</strong>: Builds a strong engineering culture; collaborates across the organization.</p><p>• <strong>Impact</strong>: Long-term influence on the company’s success and industry presence.</p><p><strong>Chief Technology Officer (CTO)</strong></p><p>• <strong>Experience</strong>: 10+ years</p><p>• <strong>Skills</strong>: Visionary leader with expertise in technology and business alignment.</p><p>• <strong>Responsibilities</strong>: Define the company’s innovation strategy, identify trends, and guide technical and product direction.</p><p>• <strong>Leadership</strong>: May oversee R&amp;D or work alongside senior VPs.</p><p>• <strong>Impact</strong>: Shapes the company’s future and establishes industry leadership.</p><p>This structured breakdown allows tailoring to fit specific organizational needs, ensuring clarity and alignment for all roles.</p><p>This article was written by the author and edited for grammar and style by a GenAI application. I believe that is the proper way to utilize this technology and to disclose its use.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e2910457589" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/software-engineering-levels-8e2910457589">Software Engineering Levels</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Three Things I Wish I Knew Twenty Years Ago About Startups]]></title>
            <link>https://medium.com/software-engineering-for-the-real-world/the-three-things-i-wish-i-knew-twenty-years-ago-about-startups-b6c70e1fceb8?source=rss-c2537301a06b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6c70e1fceb8</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <dc:creator><![CDATA[Andrea Mariotti]]></dc:creator>
            <pubDate>Wed, 20 Nov 2024 18:37:24 GMT</pubDate>
            <atom:updated>2025-01-27T20:19:03.987Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Exbx6ECuWDvOZGl4w8fFUA.png" /><figcaption>generated by <a href="https://labs.openai.com/s/dh7Gzrku2pZ7xop4WfiGn59W">Dall-E</a></figcaption></figure><blockquote>If you are not a member, you can still read my story using my <a href="https://medium.com/software-engineering-for-the-real-world/the-three-things-i-wish-i-knew-twenty-years-ago-about-startups-b6c70e1fceb8?source=friends_link&amp;sk=faa40f50426c6b88053543468bd1d9fb">friend link.</a></blockquote><p>In a recent article I briefly touch on <a href="https://medium.com/@andrea.mariotti/an-approach-to-user-centric-innovation-solving-process-problems-for-workplace-innovation-e32bc8a555e6">user centric innovation</a>. Here we dive into a broader reflection on lesson learned.</p><p>Starting a business is an exciting and challenging endeavor that requires careful planning and execution. As someone who has gained valuable experience in the startup world, I can’t help but reflect on the three key lessons I wish I had known twenty years ago. Understanding the opportunity, finding the right talent, and making the first $1 are three fundamental aspects that can make or break a startup.</p><p>1. Understand the Opportunity: One of the first steps in building a successful startup is identifying a problem worth solving. A deep understanding of the pain points faced by potential users is crucial. Determine who your target audience is and who the stakeholders are in the equation. Ask yourself if these stakeholders are willing to pay for your solution. If not, explore alternative ways to monetize your business idea. Additionally, consider how quickly you can start generating revenue. The ability to monetize early on can be vital for sustaining your startup and attracting further investment.</p><p>2. Find the Right Talent: Building a strong team is essential for any startup’s success. While experience is valuable, it’s important to prioritize cultural fit and energy in the early stages. Look for talented individuals who are enthusiastic about the entrepreneurial spirit and are willing to fully invest themselves in the journey. A high-energy, passionate professional with a willingness to learn and adapt can often bring more value to a startup’s early stages than a seasoned veteran who may be accustomed to corporate ways of working. Surround yourself with individuals who share your vision and are driven to achieve it.</p><p>3. Make the First $1: Obtaining that first dollar from a paying customer holds immense significance for a startup. It serves as a validation of your business model assumptions and demonstrates market interest. Even if the initial purchase is a mere $1, it proves that there is demand for your product or service. Many entrepreneurs have encountered situations where potential customers express interest but fail to follow through with an actual purchase. Learning from this process is invaluable, as it provides insights into customer behavior and helps refine your offering.</p><p>Remember, engineering skills alone are not sufficient for running a successful high-tech business. By understanding the opportunity, finding the right talent, and making that all-important first $1, you lay a solid foundation for your startup’s growth. Embrace the challenges that come your way, remain adaptable, and always be willing to learn from your experiences. With these lessons in mind, you’ll be better equipped to navigate the dynamic landscape of startups and increase your chances of long-term success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6c70e1fceb8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-engineering-for-the-real-world/the-three-things-i-wish-i-knew-twenty-years-ago-about-startups-b6c70e1fceb8">The Three Things I Wish I Knew Twenty Years Ago About Startups</a> was originally published in <a href="https://medium.com/software-engineering-for-the-real-world">Software Engineering For The Real World</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>