A programming interview contest between ChatGPT, Bard, and Bing

What is the best AI tool for code generation?

Darren Broemmer
11 min readMay 23, 2023

The world of software engineering has changed forever with the introduction of Large Language Models (LLM) and generative AI. But which one is the best at helping you write code?

We decided to put each through coding challenges one might face in a programmer interview. In this article, we look at three leading free, web-based alternatives. There are, of course, also GitHub Copilot and ReplIt Ghostwriter to name a few other paid alternatives. We will look at those in a follow-up article.

We evaluated the currently available web version for each option based on its generated code accuracy, performance, client/test code, and any explanations/guidance provided along with the solution. Let’s jump in.

Problem #1: Write a Least-Recently-Used (LRU) Cache

I was actually given this coding problem on a whiteboard when I interviewed for Amazon. It's basically a dictionary with a fixed maximum size that requires you to evict the least recently used key. FWIW, I did get the job at AWS and worked there for almost five years, so I must have done reasonably well on this question. But let’s ask our AI assistants to solve this problem for us.

--

--

Darren Broemmer

I write weekly on puzzles, science, and technology. Technologist, published author, ex-BigTech, indie publisher.