SShortSingh.
Back to feed

Developer uses same AI to write and review code, catching 3 self-made bugs

0
·1 views

A developer building a Windows screenshot-translation app discovered that asking an AI to review its own freshly written code — by role-switching to a 'skeptical senior engineer' — uncovered three real bugs the same model had missed during writing. The bugs emerged in a fix for an OCR pipeline that was skipping white text on dark backgrounds, and included flawed shape logic, over-aggressive noise removal, and incorrect brightness measurement. The developer notes that writing and reviewing code engage different cognitive orientations: writing checks intent fulfillment, while reviewing questions whether the intent was correct to begin with. Crucially, not every finding from the AI review was acted on immediately; each was triaged as a real bug, a design choice, or a false positive before any change was made. The experiment suggests that role framing — not model capability — can meaningfully shift what an AI notices in its own output.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Engineer Builds Custom Transpiler to Migrate 4,000 Chatbot Tests to Playwright

A software engineer at an unnamed company built a custom transpiler pipeline to migrate over 4,000 legacy QA tests to the Playwright framework after joining an internal team tasked with improving the QA pipeline. The existing test suite stored all test cases in a spreadsheet workbook using BDD-style keywords, which caused serious issues including binary file conflicts in Git, no tooling support, and difficulty debugging or running tests in parallel. A full LLM-based migration was ruled out due to token cost constraints and the need for determinism and traceability. Instead, the engineer designed a multi-stage transpiler pipeline in TypeScript — moving from workbook extraction through semantic analysis to code emission — completed within a self-imposed two-week deadline. Key libraries used included xlsx for reading the workbook and ts-morph for programmatically generating the output TypeScript test files.

0
ProgrammingDEV Community ·

Why 'Open to Offers' Listings Kill Pre-Revenue App Sales on Marketplaces

Listing a pre-revenue app with no asking price and an 'open to offers' note is widely cited as the most common reason such sales fail, as it forces buyers — who have the least information — to do the pricing work themselves. Without monthly recurring revenue, there is no standard valuation multiple, leaving buyers with no default answer to the question of what the asset is worth. Industry data from micro-startup marketplace Microns shows roughly 90 pre-revenue projects sold over three years at an average of around $4,300, with its founder noting that buyers rarely pay well for pre-revenue SaaS. Analysts suggest valuing such products based on replacement cost — estimated developer hours multiplied by an hourly rate, then discounted 40–70% to account for unproven demand — with additional assets like a domain, waitlist, or user base pushing the price higher. Research in auction economics supports fixed or floor-price listings over open negotiations, particularly when asset valuation is highly uncertain, as competitive bidding tends to discover price more effectively than one-on-one bargaining.

0
ProgrammingDEV Community ·

How Three Root Files Can Make AI Coding Agents Production-Ready

AI coding tools like Lovable and Cursor are powerful but share a common weakness: they lack persistent context about a project's conventions, architecture, and library choices. Sandbox agents generate fast prototypes but lose all project-specific decisions the moment a session ends, while file-system agents read real codebases but often invent conflicting conventions without proper guidance. The core problem is that language models operate within a sliding context window, forcing them to guess at naming patterns, component APIs, state management, and architectural rules when no reference exists. A practical fix involves placing a small set of structured files — such as CLAUDE.md, .cursorrules, and AGENTS.md — at the repository root, where agents can automatically read them at the start of every session. Written once and maintained alongside the codebase, these files give AI agents the project-specific map they need to bridge the gap between prototype and production.

0
ProgrammingDEV Community ·

DevTools Launches Browser-Side Password Generator Using Web Crypto API

DevTools has released a browser-based password generator that uses the Web Crypto API's crypto.getRandomValues() method to produce cryptographically secure passwords and passphrases. Unlike tools relying on Math.random(), it draws from the operating system's entropy sources, making output resistant to prediction or reproduction. Users can customize password length, character sets, and filtering options, while a passphrase mode offers a memorable yet secure alternative. All processing happens entirely client-side, meaning no password data is ever sent to a server. The tool is part of a suite of over 200 free, no-signup privacy-first utilities available through DevTools.

Developer uses same AI to write and review code, catching 3 self-made bugs · ShortSingh