# If You&#39;re Going to Have AI Write Your Business Tools, Use Python

A public benchmark gave Claude Code the same task in thirteen programming languages and measured the result. Python, Ruby, and JavaScript were 1.4 to 2.6 times faster and cheaper than statically typed alternatives. Here is what that means for any small business hiring AI-assisted code work.

Author: J.A. Watte
Published: May 15, 2026
Source: https://jwatte.com/blog/blog-claude-python-for-business-tools/

---

The pitch from your contractor (or your AI-coding tool, if you are doing it yourself) is the same either way. We can build the integration. We can connect QuickBooks to the email tool. We can write the script that pulls your appointments from Calendly and drops them into a daily report.

What nobody usually mentions in the quote is which programming language the work will be written in. The contractor picks whichever they prefer. The AI tool picks whichever feels natural to it. The choice ends up looking arbitrary.

In March 2026, an engineer who writes under the name huizhou92 published a Medium piece called ["Which Programming Language Should You Use with Claude Code? A benchmark across 13 languages reveals surprising patterns"](https://medium.huizhou92.com/which-programming-language-should-you-use-with-claude-code-39beaa4693af). The piece summarizes a public benchmark by another engineer who goes by "mame," hosted at [github.com/mame/ai-coding-lang-bench](https://github.com/mame/ai-coding-lang-bench).

The methodology was clean. Give Claude Code the same task in thirteen different programming languages. Run each language twenty times. Measure three things every run: how long it took, how much it cost in API tokens, and whether the code actually worked. Six hundred total runs.

The findings, blunt.

Ruby, Python, and JavaScript won on every measure. Fastest to generate. Cheapest in tokens. Most stable across runs.

Statically typed languages came in 1.4 to 2.6 times slower and more expensive.

The only outright failures across all 600 runs were in Rust and Haskell.

If you are paying an AI tool by the token, or paying a contractor whose AI tool is paying by the token, language choice is no longer arbitrary. It is a 1.5x to 2.5x cost multiplier on every line of code AI writes for your business.

## Why this happened

The author of the benchmark is a longtime Ruby committer. He went into the experiment expecting Ruby to do well because of his bias, and then ran the experiment anyway. The fact that Python and JavaScript also did well (and that TypeScript, the typed cousin of JavaScript, did much worse) tells us the result is not about Ruby specifically. It is about something deeper.

The likely cause: Claude has seen vastly more code in dynamic languages than in static ones. There is more Python on GitHub than any other language by some margin. JavaScript is everywhere a browser is. Ruby has Rails. Static-language repositories are smaller in aggregate, more recent in adoption, and the AI has fewer high-quality examples to learn from.

The grammar of the language matters too. A statically typed language requires the AI to track type information across the entire codebase, predict it correctly, and generate code that compiles. A dynamic language lets the AI write code that runs and see what happens. The dynamic feedback loop is closer to how a human writes code, which is closer to how an AI was trained.

The practical effect: when you ask Claude to "write me a script that pulls last month's invoices from QuickBooks and emails any over 30 days late to the customer," it produces working Python or Ruby code on the first try, and produces TypeScript or Rust code that needs three back-and-forth iterations before it compiles.

## What this means for a small business

You probably are not writing the code yourself. You are either using a tool that has Claude write it for you, or hiring a contractor who is using Claude or a similar AI tool to write it.

Either way, you have a lever you may not know you had. You can specify the language. Three rules of thumb, in order of strictness.

**Rule 1. If you have no preference and no team to support it, pick Python.**

Python has libraries for almost every data source a small business uses: QuickBooks, Stripe, Salesforce, HubSpot, Mailchimp, Google Sheets, Calendly, Square, Toast, every major email provider, every major CRM. Its grammar is friendly to the AI tools writing it. n8n's HTTP-request and function-node patterns are well documented for it. It is also the most-taught programming language in the world right now, so if you eventually hire a human to maintain it, your candidate pool is enormous.

**Rule 2. Ruby is fine if your team or your contractor already speaks it.**

The benchmark says Ruby and Python perform similarly under Claude Code. The difference is ecosystem. Python is bigger. Ruby is more concentrated around web applications. If your contractor is already a Ruby person, do not force them onto Python for AI tooling. The 1.4x to 2.6x penalty in the benchmark was static vs dynamic, not Ruby vs Python.

**Rule 3. Avoid TypeScript and Rust for AI-written code, at least early.**

The temptation to use TypeScript is real. Static typing catches bugs at compile time. The codebase is more readable to a future maintainer. The team you might hire later prefers it. None of those benefits matter for the first version of a $200-a-month internal tool that you will rewrite anyway when you understand what you actually want.

For an AI-written internal tool, optimize for the AI's ability to produce working code on the first try. That favors dynamic languages.

Once you have a working pipeline, if you grow into a need for type safety, refactor into TypeScript or Rust then. You probably will not. The pipeline at the scale you are running it will be fast enough in Python forever.

## Anyone can use this, even if you do not code

Three specific scenarios.

### Scenario 1. You are hiring a freelance developer to build an integration

In the brief, include this line: "The AI-assisted portions of the codebase should be written in Python. We are following the recommendation from the mame/ai-coding-lang-bench benchmark, which shows Python is 1.4 to 2.6 times faster and cheaper than statically typed alternatives for AI-generated code."

Two things happen. The freelancer who already uses Python is happy. The freelancer who wants to charge you to write the same thing in TypeScript has to push back, and you have a public benchmark to point at.

### Scenario 2. You are using a no-code tool with AI-generated code blocks

Most no-code platforms (n8n, Make, Zapier) support code nodes in multiple languages. n8n's "Code" node supports JavaScript and Python. Pick Python. Your prompts to the AI assistant will produce working code more often, on the first try.

### Scenario 3. You are using Claude Code or a similar AI-coding tool directly

When you ask Claude to write a script, name the language up front. "Write a Python script that..." gives the AI the cleanest signal. If you forget, Claude often defaults to Python anyway, which is the benchmark's recommended choice. If it defaults to something else, redirect.

## The cost math, briefly

For a small business spending $5 to $50 a month on AI-generated code work (either directly or through a contractor's tool stack), the 1.5x to 2.5x cost multiplier from picking the wrong language is real but not disastrous. We are talking about $10 to $75 a month of waste, not $1,000.

The bigger cost is iteration time. AI-written code in a language the AI is bad at requires more back-and-forth. Each iteration costs you tokens AND your contractor's hourly rate (or your own time, if you are doing it yourself). The 1.5x to 2.5x time multiplier on every iteration is where the real money lives.

A small pipeline that takes one weekend in Python takes two weekends in Rust, and the contractor charges you for two weekends instead of one. The benchmark is not about the language as such. The benchmark is about the friction you eliminate by picking the language the AI was trained on the most.

## When to ignore this advice

There are exactly two cases where the rules above do not apply.

You are building a tool that genuinely needs high performance under heavy load. A real-time bidding system, a high-frequency trading platform, a video transcoder. Rust and Go shine here. Most small businesses do not have these needs. If you do, you are not the audience for this post anyway.

You have a team that already speaks a typed language fluently and the team is going to maintain the code long-term. Go with the team's strength. The benchmark gap matters less when an experienced human is in the loop.

For everything else, the recommendation is the same one the benchmark points at. Use Python. Or Ruby, or JavaScript, if those are already in your stack. The savings are real and they compound.

## Fact-check notes and sources

- huizhou92, "Which Programming Language Should You Use with Claude Code? A benchmark across 13 languages reveals surprising patterns," Medium, March 11, 2026. The Medium piece is a paid summary. The underlying methodology and raw data are public and free.
- The underlying public benchmark: mame, "ai-coding-lang-bench," GitHub, [github.com/mame/ai-coding-lang-bench](https://github.com/mame/ai-coding-lang-bench). Methodology and raw results are in the repo. The "1.4 to 2.6 times slower and more expensive" range and the "only failures were in Rust and Haskell" claim are verifiable in the repo's results section.
- Programming language popularity on GitHub: Python's lead in repository volume is documented in [GitHub's Octoverse report](https://octoverse.github.com/) and the [TIOBE language index](https://www.tiobe.com/tiobe-index/). Treat any specific year-over-year ranking as a moving target.
- The cost-multiplier estimate (1.5x to 2.5x on token spend) is derived from the benchmark's token-cost figures, not from a separate study. Apply with the same caveat: it is a benchmark on one task, not a universal rule.

## Related reading

- [The $50 AI stack for any small business](/blog/blog-50-month-ai-stack-smb/), what your AI-assisted code is actually going to run inside.
- [The boring AI layer decides your SMB margin](/blog/blog-boring-ai-layer-decides-smb-margin/), the strategic case for spending on integration, not on model choice.
- [The case for an AI that remembers you](/blog/blog-agent-that-remembers-you/), the layer to add once your scripts are working.
- [The Claude skill linter](/blog/blog-tool-claude-skill-linter/), keeping the system prompts that drive your AI tools clean.
- [The Claude trading lessons](/blog/blog-claude-trading-lessons/), long-form thinking on working with AI as a careful collaborator.

If you have been quoted $1,500 for a "simple" website build by an agency, the long-form version of the cost-discipline argument lives in The $97 Launch on Amazon Kindle. Same logic, applied to the broader question of what you actually need to spend money on when standing up a small-business web presence.


---

Canonical HTML: https://jwatte.com/blog/blog-claude-python-for-business-tools/
RSS: https://jwatte.com/feed.xml
JSON Feed: https://jwatte.com/feed.json
Hero image: https://jwatte.com/images/blog-claude-python-for-business-tools.webp
