Madonna and ChatGPT

by Jeff Langr

January 23, 2024

“Esquire,” courtesy Valeriia Miller at Pexels

In writing a chapter on AI for the 3rd edition of Pragmatic Unit Testing in Java, I worked through having ChatGPT generate code for one of my favorite coding exercises, the name normalizer. ChatGPT was keeping up well, but finally choked when generating code for the suffix feature.

In brief, the normalizer should transform a name like “Martin Luther King, Jr.” to the form “King, Martin L., Jr.”

For single-word names (e.g. Plato), I provided the example “Madonna, Esq.” to ChatGPT, with the expected output being that it spews back the same thing (“Madonna, Esq.”).

ChatGPT instead returned “Madonna, Madonna, Esq.”… which sounds like a great song. Here’s what ChatGPT generated when I asked for a sincere parody of “Vogue” based on this test failure:

"Madonna, Madonna, Esquire"

In the courtroom of rhythm, she lays down the law,
Madonna, Madonna, on the dance floor she soars.
With a beat so compelling, you can't help but dance,
In the world of pop royalty, she's the queen of the lance.

(Chorus)
Madonna, Madonna, Esquire,
Her music lights the darkest nights on fire.
All around the world, her voice inspires,
Strike a pose, there's nothing higher.

From the streets of New York to the halls of the great,
She's the lady of pop, her style we celebrate.
With every song and every move, she's fought her own fight,
In the court of public acclaim, she stands in her own right.

Madonna, Madonna, Esquire,
Charting her course, always aiming higher.
In the kingdom of pop, she's the eternal squire,
Strike a pose, ignite your desire.

(Bridge)
Look around, everywhere you turn you see her,
On the screen, in the dreams, she's the believer.
Music's queen, on the scene, she's the achiever,
Madonna, Madonna, the pop world's weaver.

No one's untouched by her songs of love and life,
She's the soundtrack to our days, through joy and strife.
With a heart unafraid to explore and to dare,
In the legacy of music, she's beyond compare.

(Chorus)
Madonna, Madonna, Esquire,
Her legacy, a blazing pyre.
To the throne of pop, there's no retire,
Strike a pose, and lift her higher.

Madonna, Madonna, Esquire,
In a world that's often dire,
Her music, a divine choir,
Madonna, Madonna, we admire.

A bit obsequious for my tastes, but hey, not bad, and no worse than any of the fawnee’s lyrics.

Share your comment

Jeff Langr

About the Author

Jeff Langr has been building software for 40 years and writing about it heavily for 20. You can find out more about Jeff, learn from the many helpful articles and books he's written, or read one of his 1000+ combined blog (including Agile in a Flash) and public posts.