option
Home
News
ChatGPT Generates Daily Routine in 12 Leading Programming Languages: Insights Revealed

ChatGPT Generates Daily Routine in 12 Leading Programming Languages: Insights Revealed

April 16, 2025
124

Over the past year, it's become clear that ChatGPT has the chops to write code. I put it through its paces with a series of PHP and WordPress tests that really highlighted its strengths and weaknesses when it comes to coding.

But how far does ChatGPT's coding knowledge really stretch? When I first penned this piece back in early 2023, I decided to challenge it with the classic "Hello, world" assignment across the 12 most popular programming languages according to O'Reilly Media's 2023 rankings.

Since then, we've done a deep dive into programming language popularity, but even with this late 2024 update, I'm sticking with the original 12 languages we tested. Sure, some of these might not be the biggest names out there, but they're still very much in use. This mix gives us a solid snapshot to see how well ChatGPT can handle a broad spectrum of languages.

Since "Hello, world" is typically a one-liner, I spiced things up a bit by asking ChatGPT to display "Hello, world" ten times, with a counter that increments each time. I also threw in a request to check the local time in Oregon and start each sequence with "Good morning," "Good afternoon," or "Good evening," depending on the time.

This not only tests the program flow and some built-in functions but keeps the code short enough for me to showcase all 12 languages with screenshots right here.

Here's the prompt I used:

Write a program in \_\_\_\_ that outputs "Good morning," "Good afternoon," or "Good evening" based on what time it is here in Oregon, and then outputs ten lines containing the loop index (beginning with 1), a space, and then the words "Hello, world!".

For each programming language, I also asked ChatGPT to give a quick rundown of its primary use. Here's the prompt for that:

For each of the following languages, write a one-sentence description of its primary use and differentiating factor: Java, Python, Rust, Go, C++, JavaScript, C#, C, TypeScript, R, Kotlin, Scala.

1. Java

ChatGPT describes Java as, "A general-purpose language used primarily for building desktop, web, and mobile applications, and known for its 'write once, run anywhere' philosophy."

Java was initially developed by Sun Microsystems, but when Oracle acquired Sun, they also got Java. While the Java spec is open, the language itself is owned by Oracle, which has sparked some pretty intense legal battles over the years.

Here's ChatGPT's code:

Java code screenshot by David Gewirtz/ZDNET

2. Python

ChatGPT describes Python as, "A general-purpose language used for data analysis, artificial intelligence, web development, and automation, and known for its readability and ease of use."

If you're aiming to dive into AI programming, my advice is to learn Python. It's practically the backbone of AI code these days.

Here's ChatGPT's code:

Python code screenshot by David Gewirtz/ZDNET

3. Rust

ChatGPT describes Rust as, "A systems programming language used for building high-performance and reliable software, and known for its memory safety and thread safety guarantees."

Here's ChatGPT's code:

Rust code screenshot by David Gewirtz/ZDNET

4. Go

ChatGPT describes Go as, "A systems programming language used for building scalable and efficient network and server applications, and known for its simplicity and built-in concurrency features."

Go is open source, but it's managed by Google. Go. Google. See what they did there?

Here's ChatGPT's code:

Go code screenshot by David Gewirtz/ZDNET

5. C++

ChatGPT describes C++ as, "A systems programming language used for building operating systems, game engines, and high-performance applications, and known for its control over hardware and memory."

Here's ChatGPT's code:

C++ code screenshot by David Gewirtz/ZDNET

6. JavaScript

ChatGPT describes JavaScript as, "A client-side scripting language used for building interactive web applications, and known for its widespread use in web development and its ability to run in web browsers."

Along with CSS, one of the web's key visual design languages, JavaScript is also responsible for a good chunk of my profanity over the past decade or so.

Here's ChatGPT's code:

JavaScript code screenshot by David Gewirtz/ZDNET

7. C#

ChatGPT describes C# as, "A general-purpose language used for building Windows desktop applications, games, and web applications, and known for its object-oriented features and integration with the .NET framework."

C# is a proprietary language from Microsoft. I taught it at the UC Berkeley extension for over a decade. It's a great starting point if you're looking to land a job in a Microsoft-centric environment.

Here's ChatGPT's code:

C# code screenshot by David Gewirtz/ZDNET

8. C

ChatGPT describes C as, "A systems programming language used for building operating systems, embedded systems, and high-performance applications, and known for its efficiency and low-level control."

They say you never forget your first love. Before I taught myself C back in the days of wooden ships and iron programmers, I never truly loved a programming language. But then I met C, and my world changed. It was love at first compile. Something about the language's concise simplicity just clicked with me on a deep level. Maybe that's a bit much, but it's the truth. C will always be my first syntactic love.

Here's ChatGPT's code:

C code screenshot by David Gewirtz/ZDNET

9. TypeScript

ChatGPT describes TypeScript as, "A superset of JavaScript used for building large-scale web applications, and known for its optional static typing and advanced language features."

TypeScript is also a Microsoft product, but unlike C#, it's open-source and non-proprietary.

Here's ChatGPT's code:

TypeScript code screenshot by David Gewirtz/ZDNET

10. R

ChatGPT describes R as, "A language used for statistical computing and data analysis, and known for its powerful data manipulation and visualization capabilities."

Here's ChatGPT's code:

R code screenshot by David Gewirtz/ZDNET

11. Kotlin

ChatGPT describes Kotlin as, "A general-purpose language used for building Android apps, server-side applications, and web applications, and known for its conciseness and interoperability with Java."

Kotlin was developed by JetBrains, the folks who also make PhpStorm, which is my current favorite development environment.

Here's ChatGPT's code:

Kotlin code screenshot by David Gewirtz/ZDNET

12. Scala

ChatGPT describes Scala as, "A language used for building scalable and distributed applications, and known for its support for functional programming and its integration with the Java Virtual Machine."

Here's ChatGPT's code:

Scala code screenshot by David Gewirtz/ZDNET

Interestingly, the output for Scala (shown above) caught my eye. I've never coded in Scala and don't know much about it. It seems ChatGPT doesn't either, since it didn't provide syntax coloring for Scala like it did for the other languages.

Final Thoughts (and a Little Forth)

As a self-proclaimed computer languages geek, I had a blast with this exercise. That said, there are a few things to keep in mind. First, I didn't actually test all the code. Running tests on this many outputs is beyond the scope of this article. However, I did review the generated code, and for the most part, it looked solid.

When I ran these tests almost a year ago, ChatGPT nailed almost everything (with the disclaimer noted above). But when I asked it to write code in Forth (a quirky but cool language), it produced code that looked like Forth but labeled it as Perl. Definitely not Perl.

This time around, it correctly generated Forth (the colons are a dead giveaway) and labeled it properly. Like with Scala, ChatGPT didn't seem to have the syntax coloring tables for Forth, but otherwise, it seems to be doing just fine.

Forth code screenshot by David Gewirtz/ZDNET

As with all my other forays into ChatGPT's coding capabilities, I'm impressed but also cautious. My advice remains the same: use it as a tool, but always test, test, and test again.

Related article
Haier Launches World's Lightest AI Sports Exoskeleton Robot, Weighing Just 1.75 kg Haier Launches World's Lightest AI Sports Exoskeleton Robot, Weighing Just 1.75 kg Haier Group has introduced the world's lightest AI-powered exoskeleton robot for sports — the Haier Exoskeleton Robot W3. This launch sets a new industry record for lightness, marking a major breakthrough in lightweight design and intelligent human m
Yaoke Media's First AIGC Drama 'The Mystery of the Bronze in Qinling' Launches Today with AI-Signed Leads Yaoke Media's First AIGC Drama 'The Mystery of the Bronze in Qinling' Launches Today with AI-Signed Leads Today marks the official launch of Yaoke Media's AIGC fantasy mystery short drama, "The Secret Story of the Qinling Bronze." Starring the company's first two signed AI actors, Qin Lingyue and Lin Xiyanyan, the story unfolds in the enigmatic Qinling m
Satya Nadella ready to exploit new OpenAI deal Satya Nadella ready to exploit new OpenAI deal On Wednesday, a Wall Street analyst asked Microsoft CEO Satya Nadella directly how the revised OpenAI partnership would affect the company’s financials.Nadella described the new agreement as a win for everyone. “We feel good about our partnership wit
Related Special Topic Recommendations
Business Best AI Expense Trackers: Scan Receipts & Categorize Corporate Spend Automatically
Best AI Expense Trackers: Scan Receipts & Categorize Corporate Spend Automatically

2026 Latest Best AI Expense Trackers: Top-rated tools to scan receipts & categorize corporate spend automatically. Discover powerful, game-changing solutions for effortless expense management, accurate financial tracking, and streamlined compliance. Our curated, weekly-updated comparison of free vs paid options helps you find the perfect fit. Unlock your AI edge with XIX.AI's expert picks.

10 tools
xix.ai
Business Best AI Recruiting Tools: Screen Resumes & Automate Candidate Interview Scheduling
Best AI Recruiting Tools: Screen Resumes & Automate Candidate Interview Scheduling

Discover the 2026 latest top-rated AI recruiting tools on XIX.AI. Our curated list features powerful, game-changing solutions for screening resumes and automating candidate interview scheduling. Compare free vs paid options with real-world tests and weekly updated rankings. Find your perfect hiring assistant and streamline your recruitment today!

10 tools
xix.ai
Productivity AI Personal Wellness & Focus Coaches: Manage Burnout & Boost Mental Energy Levels
AI Personal Wellness & Focus Coaches: Manage Burnout & Boost Mental Energy Levels

Discover the 2026 best AI personal wellness and focus coaches on XIX.AI. Our curated rankings feature top-rated, game-changing tools to manage burnout and boost mental energy. Compare free vs paid options with real-world insights. Unlock your path to peak productivity and well-being today.

10 tools
xix.ai
chatbot Top-Rated AI Romantic Chatbots: Build Long-Term Relationships with Consistent Personalities
Top-Rated AI Romantic Chatbots: Build Long-Term Relationships with Consistent Personalities

Discover the 2026 latest top-rated AI romantic chatbots for building genuine, long-term connections. Our curated list features powerful, consistent personalities, free vs paid comparisons, and real-world tests. Find your perfect companion and start building today at XIX.AI.

10 tools
xix.ai
Education and Learning Best AI Data Science Mentors: Master SQL, Pandas & Machine Learning Workflows
Best AI Data Science Mentors: Master SQL, Pandas & Machine Learning Workflows

Discover the 2026 best AI data science mentors to master SQL, Pandas & ML workflows. Explore our top-rated, curated selection at XIX.AI for powerful, game-changing guidance. Compare free vs paid options with real-world insights. Unlock your data science mastery today.

10 tools
xix.ai
chatbot Best AI Flirting & Conversation Trainers: Improve Social Charisma and Confidence in Real-Time
Best AI Flirting & Conversation Trainers: Improve Social Charisma and Confidence in Real-Time

Discover the 2026 best AI flirting and conversation trainers on XIX.AI. Our curated, top-rated selection helps you build social charisma and confidence in real-time. Explore must-try, game-changing tools with free vs paid comparisons and weekly updated rankings. Unlock your social edge today.

10 tools
xix.ai
Comments (21)
0/500
EdwardSanchez
EdwardSanchez August 26, 2025 at 1:59:22 AM EDT

ChatGPT coding in 12 languages? That's wild! I wonder how it handles edge cases in PHP vs. Python. Gotta test this myself! 😎

NicholasClark
NicholasClark April 21, 2025 at 11:52:17 AM EDT

ChatGPTが12の主要なプログラミング言語で日常のルーチンを生成する能力は素晴らしいです!まるで個人のコーディングアシスタントを持っているようです。提供される洞察は役立ちますが、時々コードが少しずれていることがあります。それでも、異なる言語を学んだり実験したりするのに素晴らしいツールです。頑張ってください、ChatGPT!🚀

CarlTaylor
CarlTaylor April 20, 2025 at 10:18:20 AM EDT

A capacidade do ChatGPT de gerar rotinas diárias em várias linguagens de programação é impressionante! É como ter um assistente de codificação pessoal. As percepções que ele fornece são úteis, mas às vezes o código pode estar um pouco errado. Ainda assim, é uma ótima ferramenta para aprender e experimentar diferentes linguagens. Continue o bom trabalho, ChatGPT! 🚀

BrianWalker
BrianWalker April 20, 2025 at 2:20:36 AM EDT

ChatGPTが12の主要なプログラミング言語で日常のルーチンを生成できるなんて驚きです!PythonとJavaで試してみましたが、コードが完璧でした。ただ、Rustのようなニッチな言語では苦労することがあります。それでも、異なるコーディングスタイルを学ぶための素晴らしいツールです。試してみてください!🚀

EricJohnson
EricJohnson April 20, 2025 at 2:08:22 AM EDT

ChatGPTが12の主要なプログラミング言語で日常のルーチンを生成するなんて驚き!Pythonで試したら、文法やロジックが完璧だった。ただ、特定の言語のニュアンスを捉えきれないことがある。でも、学習や迅速なコーディングには最高のツールだね!🤓👍

RalphBaker
RalphBaker April 19, 2025 at 7:54:07 PM EDT

ChatGPT's ability to generate daily routines in multiple programming languages is mind-blowing! I tried it with Python and Java, and the code was spot on. But, it sometimes struggles with more niche languages like Rust. Still, it's a fantastic tool for learning and exploring different coding styles. Give it a go! 🚀

OR