ChatGPT Generates Daily Routine in 12 Leading Programming Languages: Insights Revealed
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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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.

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
AI-Powered Summary: A Complete Guide to Summarizing YouTube Videos
In today's fast-paced world, the ability to quickly process and understand information is more important than ever. YouTube, with its endless array of videos, is a treasure trove of knowledge, but who has the time to watch every video from start to finish? This guide will show you how to use AI tool
AI Revolutionizes Ultrasound for Point-of-Care Assessments
Artificial intelligence is shaking up the world of healthcare, and ultrasound technology is riding that wave of change. This article dives into how AI is transforming point-of-care ultrasound (POCUS) assessments, making them more accessible, efficient, and accurate. From smoothing out the kinks in i
Machine Learning Cheat Sheets: Essential AI Quick Reference Guide
In the dynamic world of technology, where AI and cloud computing are driving innovation, staying updated and ready is crucial. Whether you're discussing strategies with a colleague, crafting educational content, or gearing up for an interview, having quick access to key information can make all the
Comments (20)
0/200
JoseMiller
April 17, 2025 at 12:00:00 AM GMT
ChatGPT's ability to generate code in multiple languages is impressive, but it's not perfect. I tried using it for my daily routine and found some bugs in the PHP code. Still, it's a great starting point for beginners. Maybe next update will fix those pesky errors! 🤓
0
RalphJohnson
April 17, 2025 at 12:00:00 AM GMT
ChatGPTが複数の言語でコードを生成できるのは感心しますが、完璧ではありません。私は日常のルーチンに使ってみましたが、PHPのコードにバグが見つかりました。それでも、初心者にとっては良いスタートポイントです。次のアップデートであの厄介なエラーが修正されるといいですね!🤓
0
MichaelDavis
April 17, 2025 at 12:00:00 AM GMT
A capacidade do ChatGPT de gerar código em várias linguagens é impressionante, mas não é perfeita. Tentei usá-lo para minha rotina diária e encontrei alguns bugs no código PHP. Ainda assim, é um ótimo ponto de partida para iniciantes. Talvez a próxima atualização corrija esses erros chatos! 🤓
0
GeorgeMiller
April 16, 2025 at 12:00:00 AM GMT
La capacidad de ChatGPT para generar código en múltiples lenguajes es impresionante, pero no es perfecta. Lo probé para mi rutina diaria y encontré algunos errores en el código PHP. Aún así, es un gran punto de partida para principiantes. ¡Quizás la próxima actualización solucione esos molestos errores! 🤓
0
GeorgeSmith
April 17, 2025 at 12:00:00 AM GMT
ChatGPT की कई भाषाओं में कोड जनरेट करने की क्षमता प्रभावशाली है, लेकिन यह परफेक्ट नहीं है। मैंने अपनी दैनिक रूटीन के लिए इसका उपयोग किया और PHP कोड में कुछ बग्स पाए। फिर भी, यह शुरुआती लोगों के लिए एक अच्छा शुरुआती बिंदु है। शायद अगला अपडेट इन चिढ़ाने वाली गलतियों को ठीक कर देगा! 🤓
0
RalphBaker
April 20, 2025 at 12:00:00 AM GMT
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! 🚀
0
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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.
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.




ChatGPT's ability to generate code in multiple languages is impressive, but it's not perfect. I tried using it for my daily routine and found some bugs in the PHP code. Still, it's a great starting point for beginners. Maybe next update will fix those pesky errors! 🤓




ChatGPTが複数の言語でコードを生成できるのは感心しますが、完璧ではありません。私は日常のルーチンに使ってみましたが、PHPのコードにバグが見つかりました。それでも、初心者にとっては良いスタートポイントです。次のアップデートであの厄介なエラーが修正されるといいですね!🤓




A capacidade do ChatGPT de gerar código em várias linguagens é impressionante, mas não é perfeita. Tentei usá-lo para minha rotina diária e encontrei alguns bugs no código PHP. Ainda assim, é um ótimo ponto de partida para iniciantes. Talvez a próxima atualização corrija esses erros chatos! 🤓




La capacidad de ChatGPT para generar código en múltiples lenguajes es impresionante, pero no es perfecta. Lo probé para mi rutina diaria y encontré algunos errores en el código PHP. Aún así, es un gran punto de partida para principiantes. ¡Quizás la próxima actualización solucione esos molestos errores! 🤓




ChatGPT की कई भाषाओं में कोड जनरेट करने की क्षमता प्रभावशाली है, लेकिन यह परफेक्ट नहीं है। मैंने अपनी दैनिक रूटीन के लिए इसका उपयोग किया और PHP कोड में कुछ बग्स पाए। फिर भी, यह शुरुआती लोगों के लिए एक अच्छा शुरुआती बिंदु है। शायद अगला अपडेट इन चिढ़ाने वाली गलतियों को ठीक कर देगा! 🤓




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! 🚀












