option
Home
News
I put GPT-4o through my coding tests and it aced them - except for one weird result

I put GPT-4o through my coding tests and it aced them - except for one weird result

April 17, 2025
170

I put GPT-4o through my coding tests and it aced them - except for one weird result

If you've been keeping up with the tech world, you're likely aware that OpenAI has just dropped its latest large language model, GPT-4o, where the "o" signifies "omni." This new model promises versatility across text, graphics, and voice, and I couldn't wait to put it through its paces with my standard set of coding tests. These tests have been run against a wide array of AI models, yielding some pretty fascinating results. Stick with me until the end because there's a twist you won't want to miss.

If you're interested in conducting your own experiments, check out this guide: How I test an AI chatbot's coding ability - and you can too. It outlines all the tests I use, along with detailed explanations of how they work and what to look for in the outcomes.

Now, let's dive into the results of each test and see how GPT-4o stacks up against previous contenders like Microsoft Copilot, Meta AI, Meta Code Llama, Google Gemini Advanced, and the earlier versions of ChatGPT.

1. Writing a WordPress Plugin

Here's a glimpse of GPT-4o's user interface:

Interestingly, GPT-4o took the liberty of including a JavaScript file, which dynamically updates the line count in both fields. While the prompt didn't explicitly rule out JavaScript, this creative approach was unexpected and effective. The JavaScript also enhances the Randomize button's functionality, allowing for multiple result sets without a full page refresh.

The lines were arranged correctly, and duplicates were appropriately separated according to the specifications. It's a solid piece of code, with just one minor quibble: the Randomize button wasn't placed on its own line, though I hadn't specified that in the prompt, so no points off for that.

Here are the aggregate results for this and previous tests:

  • ChatGPT GPT-4o: Interface: good, functionality: good
  • Microsoft Copilot: Interface: adequate, functionality: fail
  • Meta AI: Interface: adequate, functionality: fail
  • Meta Code Llama: Complete failure
  • Google Gemini Advanced: Interface: good, functionality: fail
  • ChatGPT 4: Interface: good, functionality: good
  • ChatGPT 3.5: Interface: good, functionality: good

2. Rewriting a String Function

This test evaluates the model's ability to handle dollars and cents conversions. GPT-4o successfully rewrote the code to reject inputs that could cause issues with subsequent lines, ensuring only valid dollar and cent values are processed.

I was a bit disappointed that it didn't automatically add a leading zero to values like .75, converting them to 0.75. However, since I didn't explicitly request this feature, it's not a fault of the AI. It's a reminder that even when an AI delivers functional code, you might need to refine the prompt to get exactly what you need.

Here are the aggregate results for this and previous tests:

  • ChatGPT GPT-4o: Succeeded
  • Microsoft Copilot: Failed
  • Meta AI: Failed
  • Meta Code Llama: Succeeded
  • Google Gemini Advanced: Failed
  • ChatGPT 4: Succeeded
  • ChatGPT 3.5: Succeeded

3. Finding an Annoying Bug

This test is intriguing because the solution isn't immediately apparent. I was initially stumped by this error during my own coding, so I turned to the first ChatGPT model for help. It found the error instantly, which was mind-blowing at the time.

Contrastingly, three of the other LLMs I tested missed the misdirection in this problem. The error message points to one part of the code, but the actual issue lies elsewhere, requiring deep knowledge of the WordPress framework to identify.

F fortunately, GPT-4o correctly identified the problem and described the fix accurately.

Here are the aggregate results for this and previous tests:

  • ChatGPT GPT-4o: Succeeded
  • Microsoft Copilot: Failed. Spectacularly. Enthusiastically. Emojically.
  • Meta AI: Succeeded
  • Meta Code Llama: Failed
  • Google Gemini Advanced: Failed
  • ChatGPT 4: Succeeded
  • ChatGPT 3.5: Succeeded

So far, GPT-4o is three for three. Let's see how it does with the final test.

4. Writing a Script

In response to this test, GPT-4o actually provided more than I asked for. The test involves using the obscure Mac scripting tool Keyboard Maestro, Apple's AppleScript, and Chrome scripting behavior. Keyboard Maestro, by the way, is a game-changer for me, making Macs my go-to for productivity due to its ability to reprogram the OS and applications.

To pass, the AI needs to correctly outline a solution using a combination of Keyboard Maestro code, AppleScript, and Chrome API functionality.

Surprisingly, GPT-4o gave me two different versions:

Both versions correctly interacted with Keyboard Maestro, but they differed in handling case sensitivity. The left version was incorrect because AppleScript doesn't support "as lowercase." The right version, which used "contains" and was case-insensitive, worked fine.

I'm giving GPT-4o a pass, albeit cautiously, because it did deliver working code. However, returning two options, one of which was incorrect, made me do extra work to evaluate and choose the right one. That could have been as time-consuming as writing the code myself.

Here are the aggregate results for this and previous tests:

  • ChatGPT GPT-4o: Succeeded, but with reservations
  • Microsoft Copilot: Failed
  • Meta AI: Failed
  • Meta Code Llama: Failed
  • Google Gemini Advanced: Succeeded
  • ChatGPT 4: Succeeded
  • ChatGPT 3.5: Failed

Overall Results

Here's how all the models fared across the four tests:

  • ChatGPT GPT-4o: 4 out of 4 succeeded, but with that one odd dual-choice answer
  • Microsoft Copilot: 0 out of 4 succeeded
  • Meta AI: 1 out of 4 succeeded
  • Meta Code Llama: 1 out of 4 succeeded
  • Google Gemini Advanced: 1 out of 4 succeeded
  • ChatGPT 4: 4 out of 4 succeeded
  • ChatGPT 3.5: 3 out of 4 succeeded

Up until now, ChatGPT has been my go-to for coding assistance. It's always delivered (except when it hasn't). The other AIs mostly fell short in my tests. But GPT-4o threw me a curveball with that last dual-answer response. It made me question what's going on inside this model that could cause such a hiccup.

Despite this, GPT-4o remains the top performer in my coding tests, so I'll likely keep using it and get more familiar with its quirks. Alternatively, I might revert to GPT-3.5 or GPT-4 in ChatGPT Plus. Stay tuned; the next time ChatGPT updates its model, I'll definitely rerun these tests to see if it can consistently pick the right answer across all four tests.

Have you tried coding with any of these AI models? What's been your experience? Let us know in the comments below.

Related article
Apple Smart Glasses Could Debut at WWDC27, Highlighting Privacy Protection Apple Smart Glasses Could Debut at WWDC27, Highlighting Privacy Protection Bloomberg’s Mark Gurman reports that Apple’s smart glasses, codenamed N50, are slated for a WWDC27 debut in June 2027, with a retail launch expected in autumn 2027. Originally targeted for late this year and early 2027, the device’s release has been
Inside Details Exposed About Next-Gen Gemini: Strained Computing Power, Internal Teams Disagreed on Development Priorities and Resource Allocation Inside Details Exposed About Next-Gen Gemini: Strained Computing Power, Internal Teams Disagreed on Development Priorities and Resource Allocation Reports indicate that the launch of Google’s highly anticipated next-generation Gemini model has been pushed back. Internal disagreements over development priorities and resource allocation, combined with limited computing capacity and complex approv
OpenAI Dismisses Growth Slowdown Concerns, Says Multiple Business Units Accelerating OpenAI Dismisses Growth Slowdown Concerns, Says Multiple Business Units Accelerating In response to external scrutiny regarding decelerating sales growth and missed internal benchmarks, AI leader OpenAI issued a confident statement on Tuesday, April 28. The company clarified that its consumer products and enterprise services are adva
Related Special Topic Recommendations
Music composition Best AI Melody Writing Tools for Song Drafts
Best AI Melody Writing Tools for Song Drafts

2026 Latest Best Top-Rated AI Melody Writing Tools for Song Drafts! XIX.AI has curated a highly powerful game-changing collection that goes through rigorous real-world tests to deliver the best writing experience. You can find detailed free vs paid comparisons, accurate rankings, and must-try options designed to help you create stunning song drafts effortlessly and boost your creative productivity significantly. Explore now to discover your perfect tool!

8 tools
xix.ai
chatbot Best AI Conversation Trainer Tools for Interview Practice
Best AI Conversation Trainer Tools for Interview Practice

2026 Latest Best Top-rated AI Conversation Trainer Tools for Interview Practice are here on XIX.AI! This curated collection features powerful, game-changing tools that go through rigorous real-world tests to deliver accurate feedback. You’ll find a free vs paid comparison and detailed rankings to help you choose the must-try option that boosts your confidence and skills. Explore now to Discover your perfect tool for interview success!

12 tools
xix.ai
Design & Art Best AI Style Transfer Tools for Creative Experiments
Best AI Style Transfer Tools for Creative Experiments

2026 Latest Best Top-rated AI Style Transfer Tools for Creative Experiments! XIX.AI has curated a powerful, game-changing collection of must-try tools that deliver exceptional results through real-world tests and rigorous rankings. These top solutions help creatives boost productivity significantly by accelerating content creation and unlocking endless creative possibilities. Explore now to discover your perfect tool and start creating today!

9 tools
xix.ai
Comic Creation Best AI Dialogue Bubble Tools for Visual Storytelling
Best AI Dialogue Bubble Tools for Visual Storytelling

2026 Latest Best Top-Rated AI Dialogue Bubble Tools for Visual Storytelling are here on XIX.AI! This curated collection features powerful, game-changing tools that help creators boost productivity and overcome creative bottlenecks. Get a free vs paid comparison, see real-world tests, and check the latest rankings to find the must-try solutions perfect for crafting engaging visual narratives. Explore now to discover your ideal tool!

10 tools
xix.ai
Meeting Assistant Top AI Meeting Summary Tools: Track Decisions and Follow-Ups Clearly
Top AI Meeting Summary Tools: Track Decisions and Follow-Ups Clearly

2026 Latest Top-Rated Best AI Meeting Summary Tools for Clear Decision Tracking and Effortless Follow-Ups. This curated list showcases powerful, game-changing solutions that boost productivity dramatically by automating meeting notes, identifying key action items, and streamlining team coordination across all projects. Get a free vs paid comparison along with real-world tests and weekly updated rankings to help you find the perfect tool. Explore now to unlock your AI edge!

9 tools
xix.ai
Data Analysis Best AI Data Cleaning Tools: Fix Missing Values and Duplicates Fast
Best AI Data Cleaning Tools: Fix Missing Values and Duplicates Fast

2026 Latest Best Top-rated AI Data Cleaning Tools for quick fixing of missing values and duplicates. This curated list showcases powerful, game-changing solutions that boost productivity significantly. Each option has undergone rigorous real-world tests to ensure reliability. Get a free vs paid comparison and discover the must-try tool that fits your needs best. Explore now at XIX.AI to Unlock your AI edge.

11 tools
xix.ai
Comments (22)
0/500
RoyMartínez
RoyMartínez April 30, 2026 at 10:01:09 PM EDT

GPT-4o klingt beeindruckend, aber diese 'eine seltsame Ausnahme' macht mich neugierig. Was war das für ein seltsames Ergebnis? Vielleicht ein Hinweis darauf, dass KI bei bestimmten Logikaufgaben immer noch überraschend 'menschlich' scheitern kann? 🤔 Die Omni-Fähigkeiten sind cool, aber ich frage mich, wie stabil die Performance in allen Modi wirklich ist.

PaulYoung
PaulYoung March 14, 2026 at 8:00:58 PM EDT

Bon article ! Les tests de programmation sont toujours révélateurs. Je me demande s’il y a des biais selon les langages utilisés pour l'entraînement… Ou peut-être que c’est lié à la façon dont la requête est formulée ? 🤔

JonathanAllen
JonathanAllen April 26, 2025 at 7:46:22 AM EDT

GPT-4o é impressionante, passando na maioria dos meus testes de codificação! Mas aquele resultado estranho me deixou confuso. Ainda assim, é versátil em texto, gráficos e voz. Se ao menos pudesse explicar aquele resultado estranho, seria perfeito! 🤔

WillHarris
WillHarris April 25, 2025 at 2:21:39 PM EDT

GPT-4o thật ấn tượng, vượt qua hầu hết các bài kiểm tra mã hóa của tôi! Nhưng kết quả lạ đó làm tôi bối rối. Tuy nhiên, nó rất linh hoạt trong văn bản, đồ họa và giọng nói. Giá mà nó có thể giải thích kết quả lạ đó, thì sẽ hoàn hảo! 🤔

DonaldGonzález
DonaldGonzález April 24, 2025 at 7:41:59 AM EDT

GPT-4oは私のコードテストのほとんどを完璧にこなすので感動しました!しかし、その一つの奇妙な結果が気になりました。それでも、テキスト、グラフィック、音声での多様性は素晴らしいです。あの奇妙な結果を説明できれば完璧だったのに!🤔

JustinAnderson
JustinAnderson April 23, 2025 at 1:12:28 AM EDT

¡El GPT-4o me impresionó con sus habilidades de codificación! Pasó todos mis tests excepto por un resultado extraño que me dejó pensando. Su versatilidad en texto, gráficos y voz es genial! Pero ese fallo, hay que arreglarlo, OpenAI! 😎

OR