Back to writing

May 28, 2025 · essay

Use AI as the Hammer and KISS Your Way to Fast, Disposable Problem-Solvers

Stop building mansions to hang a picture! Discover how to use AI as your 'hammer' for quick, simple, and disposable solutions, embracing the KISS principle for everyday coding problems.

Use AI as the Hammer and KISS Your Way to Fast, Disposable Problem-Solvers header image

The short version

LLM
This blog post was drafted collaboratively with my AI assistant (Google Gemini 2.5 Pro Preview 05-06), reflecting on the philosophy of using AI for rapid, simple solutions.
Why
To advocate for a 'Keep It Simple, Stupid' (KISS) approach when using AI to build quick, 'throwaway' applications that solve immediate problems without the overhead of traditional software development.
Challenge
Many developers, both seasoned and new, instinctively overcomplicate solutions, opting for complex frameworks and architectures even for simple tasks. The challenge is to shift mindset and recognize when a simple AI-generated script is the more efficient 'hammer'.
Outcome
A guiding philosophy and practical encouragement for developers to leverage AI as a 'hammer' for specific, small-scale problems, focusing on single-file scripts (Python, HTML/JS) instead of unnecessarily large projects. The goal is to solve the problem and move on.
AI approach
The core concept discussed is leveraging an AI-First approach where the AI (like Gemini) acts as the primary code generator for simple, single-file scripts, based on clear human direction. This post itself was shaped by AI-assisted outlining and drafting, embodying the efficiency it discusses.
Learnings
AI is not just for building complex systems; it's incredibly effective at generating simple, targeted scripts quickly. Adopting the KISS principle with AI can dramatically boost productivity for small, disposable tasks. The human role becomes one of precise problem definition and AI orchestration for these 'hammer' tasks.

The House vs. The Hammer: A Modern Coding Dilemma

We've all been there. You have a simple problem – a nail to hang a picture, so to speak. In the coding world, this might be a quick data reformatting task, a one-off calculation, or scraping a single piece of information from a webpage. The straightforward solution? Grab a hammer, bang in the nail, hang the picture. Done.

Yet, what I'm seeing more and more, in both experienced developers and newcomers alike, is a tendency to respond to this 'nail' by planning to build an entire house. Instead of a quick script, we see the scaffolding for a massive React project go up, or a multi-file FastAPI server spun into existence, complete with intricate directory structures, virtual environments, and deployment pipelines. It's like deciding you need to buy a plot of land, draw up blueprints, get building permits, and hire a team of contractors, all just to hang that one picture.

This isn't a critique of robust software engineering – that has its vital place. But it's a call to recognize when we're overcomplicating things, especially when the goal is a fast, effective, and often 'throwaway' solution to an immediate problem.

The Guiding Principle: "Keep It Simple, Stupid" (KISS) in the Age of AI

The "Keep It Simple, Stupid" (KISS) principle has been a cornerstone of good design and engineering for decades. In today's world of incredibly powerful tools, especially AI, its relevance is amplified. AI can build incredibly complex systems, but it can also be the perfect tool for adhering to KISS.

Why is simple often better, particularly for these quick fixes?

  • Speed: Simple solutions are faster to create, test, and deploy.
  • Clarity: They are easier to understand, both for you and for anyone else (or your future self).
  • Reduced Overhead: Less setup, fewer dependencies, and minimal cognitive load.
  • Focus: Keeps your energy squarely on solving the actual problem, not on wrestling with framework intricacies.

When we encounter a small, well-defined problem that needs a quick solution which might never be used again, or used only a handful of times, the KISS principle should be screaming at us.

AI as the Ultimate Hammer: Your Tool for Rapid, Simple Scripting

This is where AI, particularly my AI collaborator (Google Gemini), truly shines in an unexpected way. While we often discuss AI's ability to architect and generate complex applications (and it does that brilliantly, as seen in many of my other posts), its prowess as a "hammer" for simple tasks is equally revolutionary.

Think about it: you need a Python script to read a CSV, filter some rows, and output a new CSV. Or a single HTML page with a bit of JavaScript to perform a specific calculation based on user input. Instead of manually coding this, or setting up a whole project, you can now prompt an AI: "Write a single Python script that does X, Y, and Z." Or, "Generate a single HTML file with vanilla JavaScript that takes these inputs and produces this output."

In my AI-First workflow, the AI becomes the primary coder for these small tasks. My role is to define the problem with precision and clarity. The AI, guided by a simple system instruction like "You are a concise script generator; prioritize single-file solutions using only vanilla technologies unless a specific library is essential for a simple core function," then delivers the script. Often, it's correct on the first try or needs only minor tweaks.

Why Are We Building Mansions to Hang a Picture Frame? The Overengineering Trap

The temptation to overengineer is strong. We're often taught to build for scalability, maintainability, and extensibility. These are good things! But they are not always the most important things for every task.

For a throwaway script designed to solve an immediate, one-off problem, do you really need a perfectly abstracted set of classes, a full test suite, and a CI/CD pipeline? Probably not. The time spent setting up that "proper" infrastructure for a simple task is often far greater than the time saved by its robustness, because the script itself has such a short lifespan or limited scope.

AI can help us break free from this trap for the right kinds of problems. It can be our fast lane to a functional "good enough" solution when "good enough" is precisely what's needed.

Practical "Hammer Time": Examples of AI-Powered Quick Fixes

What kind of "nails" are we talking about for our AI hammer?

  • Quick Data Munging: "Generate a Python script to parse this log file format and extract all IP addresses."
  • Simple API Interaction: "Write an HTML/JS page that takes a city name, calls this weather API, and displays the current temperature."
  • Text Processing: "Create a Python script to read all .txt files in a folder, count word frequencies, and output the top 10."
  • Batch File Renaming: "I need a script to rename files in a directory from 'IMG_1234.JPG' to 'Vacation_2025_001.jpg', sequentially."
  • Generating Boilerplate: "Give me a basic HTML/CSS/JS structure for a single-page portfolio with a header, gallery section, and footer." (Then you customize it).

These are tasks where the overhead of a large framework is unnecessary. A single, well-commented script generated by AI can be perfectly adequate.

The "AI-First" Hammering Technique: My Approach

When I approach these "hammer" tasks with my AI collaborator:

  1. Define the "Nail" Clearly: My prompt is very specific about the inputs, the desired processing, and the expected output. Ambiguity is the enemy.
  2. Set the "Hammer" Type (System Instruction): I often start with a brief system instruction: "You are an expert at creating concise, single-file scripts. Prefer vanilla Python/JavaScript. Only suggest external libraries if they are absolutely essential and simplify the core task significantly. Provide the complete script."
  3. Request the "Swing" (Initial Code Generation): The AI generates the script.
  4. Inspect the "Impact" (Test and Validate): I run the script with sample data. If it's not quite right, I provide specific feedback.
  5. Refine the "Swing" (Iterate if Necessary): "That was close, but can you modify the script to handle cases where the input file is empty?" Or, "Please add error handling for API call failures." The key is to keep the iterations focused on the simple core task.
AI First Hammer Approach

The goal isn't to build a complex, evolving piece of software, but to get a working tool for the job at hand, quickly.

Key Learnings: When to Reach for the AI Hammer

This approach isn't for every project, but it's incredibly powerful when:

  • The problem is well-defined, small in scope, and needs an immediate fix.
  • The solution is likely to be used once, a few times, or for a very specific, narrow purpose (it's a "throwaway app").
  • Formal software engineering practices (extensive testing, complex design patterns, full framework setup) are clearly overkill and would slow you down unnecessarily.
  • You want to avoid getting bogged down in the ceremony of setting up a "proper" project for a simple task.
  • You need to empower someone with limited coding experience to solve a problem (they can describe it to the AI).

Conclusion: Embrace Simplicity, Wield the AI Hammer Wisely

AI is an astonishingly versatile tool. It can help us architect and build the most complex digital "houses" imaginable. But never forget that it can also be the simplest, quickest "hammer" in your toolkit.

By embracing the KISS principle and leveraging AI's ability to rapidly generate simple scripts, we can solve a whole class of everyday problems with unprecedented speed and minimal fuss. It’s about choosing the right tool – and the right level of complexity – for the job.

So, the next time you face a simple "nail," ask yourself: Am I reaching for a blueprint or my AI hammer? Sometimes, a single, well-aimed swing is all you need to hang the picture and move on with life.