loading...

Should code be like poetry?

twitter logo github logo ・1 min read

"Treat your code like poetry and take it to the edge of the bare minimum." - ILYO

I strongly object to this idea in this week's show. Poetry is intentionally ambiguous, allowing the reader to form their own impression, let their own emotions guide what they see. Code should be clear and equivalent. I do kind of agree with minimalism though.

Listen to hear all of our arguments. Plus, status updates on my food blog programming and Stephane's quest to get a totally anonymous website.

Do you think code is like poetry? Would you like to challenge me, a weaver of verse, with a poetic debate on the topic? :)

twitter logo DISCUSS (21)
markdown guide
 
 

Well, I don't like the word poetry used to describe source code, but at the same time I really do believe that there is a place for art in being software engineer and crafting code in general.

So probably poetry was meant to be used in place of art, which I do agree with.

So art (or poetry) can be used to describe the act of creating:

A good piece of code that you can read without comments and that it's immediately obvious why it's been written, how it's elegant.

Also your podcast is stuck on loading for some reason ..

 

The audio file link has been fixed and it works now.

 

Yes, coding is definitely an art.

Sorry about the podcast, it did that once before as well. :(

 

You hit some good points. I think I always subscribed to the idea that "Code is poetry" because in a way, beautifully written code - is written art, like poetry?

 

There is definitely art in code's creation, but it serves an unambiguous engineering purpose. Like a bridge, or a building, both of which can be visually beautiful, and evoke different feelings in people, yet both have a well-defined structure purpose, and understood principles.

Code can be the same. It serves a specific role, but there may have been many ways to reach that goal. What it does is unambiguous, but there can still be beauty in its form.

 

Mm, yes I like the bridge analogy better in expressing how writing software is a artform. I think it takes a lot of skill to masterfully write code to perform complex tasks that is coherent and understood quickly.

I saw this quote today that's really sums it up really well:

Any fool can write code that a computer understand. Good programmers write code that humans can understand. - Martin Fowler, Author of Refactoring.

Yes, good quote. I use it on the chapter "CLEAN CODE AND REFACTORING" of my upcoming book. :)

 

To me, relating 'good' code to poetry is just a fanciful way of saying that code should be pleasant/enjoyable.

Part of why we're having this discussion about the meaning and merit of the quote is because the quote is somewhat poetic, i.e. pleasant to read, but also quite open to diverging interpretations. That is, the quote would be terrible code.

 

Perhaps that is why the quote doesn't have a real source -- ILYO is all I found it listed under. :)

I'm not sure all poetry is meant to be enjoyable/pleasant. I write a lot of depression/emotional stuff. Perhaps mine is a better reflection of my code than the enjoyable kind.

 

Yeah, I somewhat doubt that most people read that quote and think "indeed, code should take the minimum amount of effort to make you huddle in a corner, sobbing quietly". That said, much code out there does seem to be written with that in mind :).

 

Poetry is about interpretation and is often intentionally vague, something you should avoid like the plague when writing code. I get what the author of the quote was going for, but poetry is a bad choice for comparison.

What he implies, I think, is using standards of writing (as in books) in your code - clean, concise and tailored to the way people think.

 

Yes, in that we're embarrassed by the stuff we wrote in the past, and eventually we'll be embarrassed of the stuff we're writing now.

 

I agree with the first part of the statement but not the second. We are engineers, not puzzle makers. :)

 

I think any code with more than a few lines becomes a puzzle. The goal is to keep it a puzzle for children, the 25 piece kind. Unfortunately we at times create 5000 piece puzzles.

 
 
roses are red
violets are blue
errors at runtime
sucks to be you

...yup code should not be poetry

 

We've fixed the audio file. Sorry about it not working.

 

Is there a difference between high level language programming and low level language programming? Would HLL think that coding is like poetry more? Sorry, luddite newb posting.

 

Name two renowned poems whose meanings, according to their authors, were intended to be ambiguous.

Classic DEV Post from Aug 6 '18

Hassle free PWA icons and splash screen generation

How I managed to generate icons and iOS splash screens in various resolutions and aspect ratios for my first progressive web application

edA‑qa mort‑ora‑y profile image
I'm a creative writer and adventurous programmer. I cook monsters.

Great software developers built here

Sign up 🦄