A couple of days ago, I had a long phone conversation with my dad who is a retired programmer. We talked mostly about development topics and particularly about the role of AI in the future of programming. He has been playing around with using Google’s Jules and I told him about my experiments with GitHub Copilot.
One of the use cases he has discovered for AI is helping him refactor old C and C++ code in some of his personal projects. When I say old code, I mean code that, in some cases, he wrote decades ago. It still compiles and runs like it should which is why he has never updated it, but he felt like it would be nice to modernize some of his code bases.
The discussion became humorous and we came up with an idea for a new feature for C/C++ compilers: They should have built-in “boomer” checks that look for ancient code and spit out amusing but insulting warnings such as: “When did you learn to code? The 80s?”
However, since neither of us work on C/C++ compilers and I’m not sure such a pull request would be accepted into, say, gcc or clang even if hidden behind a flag, I decided to have AI generate a script that would recursively parse a C++ project and do exactly that. I figured it would be a good test of not only its ability to identify old code, but also its sense of humor.
I used GitHub Copilot and this is the prompt I used:
Generate a script that will recursively go through all C++ files in a directory and its subdirectories and make fun of any code that is outdated by commenting about how old the developer is.
I had it generate scripts using two different models: Claude Sonnet 4 and the brand new GPT-5. I’ve found the Claude Sonnet models work better than any of the GPT models for coding tasks, but I was surprised that it also has a better sense of humor.
Both models decided to use Python for the scripts. I intentionally didn’t specify which language to use because I was curious as to what it would choose. It didn’t surprise me that it chose Python though since it tends to be the language of choice for a lot of machine learning and AI projects. My personal preference would have been Bash, but since I wanted to send them to my dad whose projects are Windows applications, Bash wouldn’t work. As such, I decided to leave them as Python scripts. I posted both generated scripts onto GitHub as Gists.
Unfortunately, I don’t have any old C++ repositories lying around and I was also too lazy to go find some open source ones to test with, so the scripts remain untested. I’m not a Python expert, but after going through the code, it seems plausible that the scripts would work. I sent them to my dad to try out and will update this post with his results if he tries them.
Script Generated by Claude Sonnet 4
This is the script generated by Claude Sonnet 4. The outputs are much more amusing than those generated by GPT-5. Of the two, this is my favorite.
This is how you run it:
# Generate a report only (safe)
python cpp_roast_master_claude.py /path/to/your/cpp/project --report-only
# Dry run (shows what would be changed)
python cpp_roast_master_claude.py /path/to/your/cpp/project
# Actually modify files (use with caution!)
python cpp_roast_master_claude.py /path/to/your/cpp/project --no-dry-run
Script Generated by GPT-5
This is the script generated by GPT-5. While it appears like it would work, the outputs are so dry, they could have been written by someone who gets insulted by the emacs vs vim debate.
This is how you run it:
# Report only
python cpp_roast_master_gpt5.py /path/to/project --report-only
# Dry run (default)
python cpp_roast_master_gpt5.py /path/to/project
# Apply changes
python cpp_roast_master_gpt5.py /path/to/project --no-dry-run
Conclusion
As I mentioned above, I haven’t tested these scripts, but will update this post if my dad runs them. If you decide to try them out yourself, do let me know about the results! I would be really interested to hear about how well they work.
Making fun of old code is an entertaining idea even if it may not prove incredibly useful for everyday programming. It was also interesting to see how the two models compared, especially when it comes to their senses of humor. The fact that GPT-5 failed so miserably in that regard didn’t surprise me though given all of the bad press about it and its lack of personality.
Another idea we had for C/C++ compilers is that they really need a “Linus mode” that hurls really nasty insults at you for making mistakes in your code. That might be especially useful for Linux kernel developers to run before submitting a merge request. Maybe that way they can avoid some of the actual insults Linus Torvalds is so infamous for.
As a side note, I had both Microsoft Copilot and Google Gemini generate images to use for this post. I ended up using the image from Microsoft Copilot as the primary image above because I liked the “sketch” style it chose, but I also liked the one generated by Gemini which is why I’ve included it below:

