Code poetry is cool, and for those who love coding and poetry, there is various ways of exploring the magic of the same. Read on for more..
This post contains Amazon and other affiliate links, that at no additional cost to you, I may earn a small commission. Thank you for your support. Please see the full disclosure for more information. I only recommend products I definitely would (or have already) use myself
Poetic Sundays: Code Poetry
I picked up code poetry for this week’s poetic Sundays for I saw that it is National Ladies Learning Code Day on November 6 (in Canada, but we can all celebrate it, right!).
So What is Code Poetry?
Put simply, code poetry combines classical poetry and computer code. Code poems can be read as poetry and executed as code (as always, there are exceptions). They can be written with a literary meaning in mind, and can tell a story, convey a message, or showcase the beauty of programming poetry.
Code Poetry’s Characteristics
So code poetry’s elements are that at its most basic, it is:
- code! (code that can be run, as much as possible, or not)
- free of rules of rhyme or meter
Tips for Writing Code Poetry
Code poems blend the logic and structure of code with the emotional and creative aspects of poetry, resulting in a creative piece that can be both technically functional and artistically meaningful.
Here are a few tips to write code poetry:
Choose a Concept or Theme
Start by selecting a concept, theme, or idea. You could use a personal experience, or make your poem a social commentary. Or it can be about nothing at all (like the Seinfeld show!), and even abstract things.
Select a Programming Language
Write the Code… Well, Poetry… I mean Code Poetry
Start coding with a focus on readability and aesthetic quality. As you write, keep your eye on the structure and flow to not only evoke emotions or retain beauty, but also keep the coding aspect intact. It should look, feel, and sound like both code and poetry after all – the merge should be seamless.
Embrace Poetic Elements
- Use descriptive variable and function names that resonate with your theme.
- Employ formatting, indentation, and whitespace creatively to structure your code visually.
- Consider the rhythm and flow of the code, just like you would with traditional poetry.
Craft Meaningful Comments
Like in programming, your comments are an integral part of code poetry. Write comments that provide context, explanation, and enhance the poetic aspect of your work. Include some of them as lines of poetry.
Create Visual Art
Some code poems incorporate visual elements through ASCII art or graphical representations within the code, enhancing the aesthetic appeal of your creation.
Bonus Tips to Make it More Fun
- Pun and Wordplay: You know I love puns and wordplay. You can try to incorporate them into your variable names, comments, or code structure. How about a comment like “This code is knot afraid of loops!”
- Easter Eggs: Hide surprises, aka Easter eggs, in your code. These can be unexpected behaviors, comments, or humorous messages that the reader discovers when running or analyzing your code.
- Coding Challenges: Create coding challenges within your code poetry. Make the reader interact with the code in a playful way, such as solving riddles, puzzles, or mini-games embedded in the code.
- Interactive Narratives: Turn your code poetry into an interactive story or choose-your-own-adventure experience. This allows the reader to engage with the code and have fun while navigating through different paths and outcomes. Add playful game-like features, such as rewards, achievements, or funny character interactions
- Memes and References: Incorporate internet memes, pop culture references, or inside jokes that resonate with your target audience. Just ensure that the references are relevant and not overly obscure.
- Play with Visual Effects: Experiment with visual effects in the terminal or console, such as changing text colors, animations, or other dynamic elements that create a visually entertaining experience.
- Use Sound and Music: If appropriate, you can add sound effects or background music that plays when the code is executed. This can add an extra layer of fun and interactivity.
Reference, h/t, and further reading
- What Is Code Poetry? (Hyperallergic)
- Code-Poetry.com (cool code poems here – do check them out!)
- Wikipedia’s Code Poetry page
- Writing Code Poems
- SourceCodePoetry.com (more cool code poems here too)
- Code With Poetry
Running this in an online Python compiler will ask the user to enter their candies (line 2 in response below)..
On My Blog
- From Western Lane to East of the Sun and More
- 13 Ways to Build a Family Legacy Through Stories
- Amma, Tell Me a Family Story, the One Where You..
- Sunday Scribblings #163: Monody: Healing Echoes of the Heart
On the Homefront
A regular kind of week here this past week. I got over jetlag. We visited a couple of temples in the Bay Area that we had not earlier, and in one of them, had someone walk over to me and say “We met at the airport – that day when our flight was delayed by seven hours!!” (Yes it really was. And a more patient group of passengers you would and will never meet) While the delay was frustrating indeed (without a proper reason on top of that), I made many friends and hope to keep in touch with them going forward. Case in point – the temple meetup meant I have one more contact on my phone now.
Chats with friends warmed my heart as they called me to talk about my mom.
I still keep feeling my days are incomplete as I have not made my customary call to mom (and I cannot, though my brother still has kept her phone number active and has mentioned that he will leave it that way for a while yet). My mind knows that she is no longer there but my heart – well, it beats a different tale.
On My Blog and On the Homefront
Hoping to continue life stories and family stories on IG and here along with a few artsy crafty books I am excited to feature this week. And then it is the long weekend as well as a festive weekend with Deepavali on the 12th. While I am not fully ready to celebrate it at this time, I do know the festive season is all around us, literally!
Literary Celebrations (close-to-it also!)
- Literary birthdays this week include: Colson Whitehead and James Jones on Nov 6th; Albert Camus, Sabaa Tahir, and Yuyi Morales on the 7th of November; Bram Stoker, Margaret Mitchell, Raja Rao, Lauren Oliver, and Kazuo Ishiguro on Nov 8th; Anne Sexton, Janet Fitch, and Carl Sagan on Nov 9th; Oliver Goldsmith, Caroline Kepnes, and Neil Gaiman on 10th Nov; Kurt Vonnegut, Carlos Fuentes, Abul Kalam Azad, and Fyodor Dostoevsky on Nov 11th; DeWitt Wallace on Nov 12th
- Fall Children’s Book Week is Nov 6 – 12, 2023.
- It is apparently – Abet and Aid Punsters Day on November 8th.. every year too.. 🙂
- Nov 12th is National Chicken Soup for the Soul Day
- International Tongue Twister Day – Second Sunday in November
- It is National Book Award Week (Nov 7 – 13th)
- It is National Nachos Day on nov 6th. I am always up for some! How about you?
- Then it is time for something different, for the 7th is National Bittersweet Chocolate with Almonds Day
- Do you need some more caffeine? Then National Cappuccino Day on the 8th helps you there..
- followed by sweetness on the 10th with National Vanilla Cupcake Day
- Nov 11th celebrates the sundae (why, I am not sure, considering it is colder) with National Sundae Day
- National French Dip Day is observed on the 12th
Other Celebrations and Observations
- National Ladies Learning Code Day is celebrated on November 6 in Canada as part of a national advocacy program to promote coding and technology learning, especially among women
- The 7th is International Day of Medical Physics in honor of Marie Curie (born on Nov 7th, 1867). It is also National Cancer Awareness Day (in India) and given my personal history with cancer (losing loved ones to it), I am going to do my bit.
- Nov 8th is National STEM/STEAM Day as well as World Radiography Day and World Pianist Day!
- World Freedom Day and World Adoption Day are observed on the 9th of November. It is also World Quality Day (Second Thursday in November)
- Followed by National Forget-Me-Not Day and World Science Day for Peace and Development on the 10th.
- Nov 11th is Veterans Day as well as Remembrance Day; it is also International Origami Day
- This week – nov 6 – 12 – is National Recycling Week
- Deepavali is on Sunday November 12th this year
Wrapped Up: My Sunday Scribblings
So dear reader, you have reached the end of this Sunday Scribblings! As always, I welcome your thoughts, comments, and suggestions about this post. Will you be attempting to write some code poetry? or maybe code some poetry? And as always, do let me know if you plan to celebrate any of these mentioned celebrations this coming week/month?