How Poetry Can Help Programmers Write Better Code
Kevin Grosman
If you are confused:
The code that prints "and sometimes the most convoluted lines are less powerful than" is convoluted itself (and so is the text that is printed when you run the code). This is underscored by the fact that the next line, which prints "the simplest" performs the same task (printing text) in a much simpler way. The list "longandconfusingline" also has the hidden phrase "like this one!"
The code that prints "sometimes programmers overcomplicate" is unnecessarily complicated; merely deleting all of the code before "Print" would print the same text without the superfluous if...then... statement.
The code that prints "or forget/n about the elegance of poetry and /ntheir code ends up looking like a mess/n" is an example of a syntax mistake that makes code look like a mess (replacing every /n by \n would have yielded the desired result, a line break).
Finally, the line that prints "these programmers might need to add a few comments" has a comment to its right, making the code clearer and easier to read.
I was hoping someone with the poetry problem would actually code out their solution... glad you did! As someone who is not well versed in coding and therefore cannot truly appreciate the time and effort that it takes to make a successful code, I applaud your work for its creativity and complexity. Not only was your project engaging, but I also think that you captured a lot of great ideas relating coding and poetry within this post. All in all, nice work!
ReplyDeleteI have to agree with Sam, it was awesome that you were able to make such a layered project from this prompt. By coding the poem you hid meanings behind words and made connections in the lines, as poets strive to do, in a new and unique way. Part of what makes a poem successful is that it is created to be special to the author, and the reader has to do their best to interpret. This project fulfills that by your use of prior programming knowledge. Someone unversed in the coding process like myself cant fully understand the writers process even as we understand the words themselves. Round of applause!
ReplyDeleteI like the ways you make the code reflect the lines of poetry or the aspects of the poem the code is laying out. The layout of the "convoluted" line is great. Nice solution!
ReplyDeleteKevin, this entire idea is really cool. I like that you, as Kaden suggested, were able to both tangibly assert that the poem has layers, and also imply that it has layer by virtue of being a poem. I am thoroughly impressed. It's also interesting that your hinting that a reader has to extrapolate meaning as a tech has to extrapolate data. Great job!
ReplyDeleteI'm really glad someone else answered this prompt with code. What language is this?
ReplyDeletemathematica
DeleteThis brings back memories of computer programming class, I don't know how I feel about it. Regardless, your point is well taken, especially with the point about the convoluted lines. I never really thought about convoluted lines in the context of coding, but now that I think about it, it makes good sense and it parallels writing poetry well. I enjoyed your creative approach to this prompt. Good stuff
ReplyDeleteThis is so cool. The way you expressed a poem through Mathematica code is extraordinary. I enjoy programming, and I was glad when I saw this post. You did not just use the 'Print' function to output the poem. I'm amazed with the different elements of coding you used. Thank you for this work of art.
ReplyDelete