TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Is Programming Poetry?

55 pointsby andyraskinover 9 years ago

28 comments

dangover 9 years ago
Much of this thread is a dismaying example of responding only to the title. Titles are the bikesheds of HN.<p>This is an article about learning programming from Alan Perlis in 1983—a rich topic. &quot;Is programming poetry?&quot; was obviously not meant to be taken literally: the subtitle is &quot;yes and no&quot; and the text makes clear that Perlis was being provocative. The article deserves deeper attention than this. It&#x27;s about learning programming from a master who used unconventional methods, and a first-hand report on what Perlis himself wrote about in <a href="http:&#x2F;&#x2F;www.jsoftware.com&#x2F;papers&#x2F;perlis77.htm" rel="nofollow">http:&#x2F;&#x2F;www.jsoftware.com&#x2F;papers&#x2F;perlis77.htm</a>.
评论 #10481967 未加载
评论 #10481969 未加载
pachydermicover 9 years ago
<p><pre><code> BEFOREHAND: close door, each window &amp; exit; wait until time. open spellbook, study, read (scan, select, tell us); write it, print the hex while each watches, reverse its length, write again; kill spiders, pop them, chop, split, kill them. unlink arms, shift, wait &amp; listen (listening, wait), sort the flock (then, warn the &quot;goats&quot; &amp; kill the &quot;sheep&quot;); kill them, dump qualms, shift moralities, values aside, each one; die sheep! die to reverse the system you accept (reject, respect); next step, kill the next sacrifice, each sacrifice, wait, redo ritual until &quot;all the spirits are pleased&quot;; do it (&quot;as they say&quot;). do it(*everyone***must***participate***in***forbidden**s*e*x*). return last victim; package body; exit crypt (time, times &amp; &quot;half a time&quot;) &amp; close it, select (quickly) &amp; warn your next victim; AFTERWARDS: tell nobody. wait, wait until time; wait until next year, next decade; sleep, sleep, die yourself, die at last # Larry Wall </code></pre> <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Black_Perl" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Black_Perl</a>
manlioover 9 years ago
Fell in love with this one years ago, and still love it...<p><pre><code> #!&#x2F;usr&#x2F;bin&#x2F;perl APPEAL: listen (please, please); open yourself, wide; join (you, me), connect (us,together), tell me. do something if distressed; @dawn, dance; @evening, sing; read (books,$poems,stories) until peaceful; study if able; write me if-you-please; sort your feelings, reset goals, seek (friends, family, anyone); do*not*die (like this) if sin abounds; keys (hidden), open (locks, doors), tell secrets; do not, I-beg-you, close them, yet. accept (yourself, changes), bind (grief, despair); require truth, goodness if-you-will, each moment; select (always), length(of-days) # listen (a perl poem) # Sharon Hopkins # rev. June 19, 1995</code></pre>
评论 #10482005 未加载
veddoxover 9 years ago
Being both a hobby programmer and a hobby poet, I concur with the author: yes and no.<p>There are some aspects to programming that have an aesthetic very similar to that of poetry. It is not in vain that we talk of &quot;elegant&quot; solutions to a problem, or say that [your favourite language] is &quot;beautiful&quot;. So in that sense, yes, code can be a poem.<p>However, there are other areas where the two are worlds apart. First and foremost their purpose: code is meant to cause action (on the part of a computer). Any beauty is a side effect. Poetry is meant to be beautiful, to evoke feelings. If the reading of a poem causes an action in a reader, that is usually a side effect. So in that sense, no, code is definitely not poetry :D
theohover 9 years ago
<a href="http:&#x2F;&#x2F;writing.upenn.edu&#x2F;~afilreis&#x2F;88&#x2F;wcw-machine.html" rel="nofollow">http:&#x2F;&#x2F;writing.upenn.edu&#x2F;~afilreis&#x2F;88&#x2F;wcw-machine.html</a><p>William Carlos Williams<p>On poems as machines made out of words<p>&quot;To make two bold statements: There&#x27;s nothing sentimental about a machine, and: A poem is a small (or large) machine made out of words. When I say there&#x27;s nothing sentimental about a poem, I mean that there can be no part that is redundant.<p>Prose may carry a load of ill-defined matter like a ship. But poetry is a machine which drives it, pruned to a perfect economy. As in all machines, its movement is intrinsic, undulant, a physical more than a literary character.&quot;
评论 #10482064 未加载
calebmover 9 years ago
No (I don&#x27;t agree with the poetry definition put forth), but programming is LIKE poetry is some ways. Here&#x27;s one way: analogies in poetry are like libraries in programming; an analogy (like a library function call) can convey a mountain of meaning.
评论 #10480293 未加载
评论 #10482707 未加载
eamsenover 9 years ago
Code isn&#x27;t poetry, but the craft of code writing resembles writing poetry in terms of rhythm and aesthetics in a highly abstracted form.
AUmryshover 9 years ago
Poetry is about painting images with words. Often poetry will do this by not saying what is actually happening or the thought it intends to create in the reader.<p>A program is written to perform math, and it is generally considered bad to waste space with needless things. It doesn&#x27;t aid the reader or the compiler or the execution to add unused variables. It&#x27;s really bad in a program to do things in an unclear way.<p>Poetry can have ambiguities, good software can&#x27;t.<p>They do both share some amount of necessity of context. Both often have abstraction. I would say poetry is kind of a playful use of language, whereas programming is really more of a clever use of math.
bltover 9 years ago
&gt; <i>Think about the greatest, most beautiful cathedrals in Europe. Some of them took more than 500 years to build. Can you imagine the grandeur and scope of the computer programs we will build over the next 500 years?</i><p>Now that is inspirational.<p>I&#x27;ve managed to spend my software development career mostly writing programs that I feel are meaningful and useful, and I&#x27;m very thankful for that. But nothing I&#x27;ve written is going to last more than 10 or 20 years. I would love to produce an artifact that lasts centuries some day.<p>So far, discounting stuff that only lives because of some legacy hardware system, we&#x27;ve got maybe LINPACK and... what else?
评论 #10482169 未加载
评论 #10481802 未加载
评论 #10482002 未加载
评论 #10481658 未加载
code_sterlingover 9 years ago
If programming is poetry, then I write limericks for a living.
mabboover 9 years ago
&gt; Poetry is an art form that conveys not just meaning, but also emotion. You can’t express emotion through code.<p>Oh, code doesn&#x27;t just express emotion- it instigates it. Usually pure, infernos of anger at the damned bastard who wrote it.
masswerkover 9 years ago
For an example of some great code that is both to the point and expressive, see the original code version for the &quot;Expensive Planetarium&quot; by Peter Samson (PDP-1 Macro-assembler, 1962). – The Expensive Planetarium is a piece of autonomous code inside Spacewar!, the first digital video game, displaying a slowly moving realistic background starfield.<p>[1] <a href="http:&#x2F;&#x2F;www.masswerk.at&#x2F;spacewar&#x2F;inside&#x2F;insidespacewar-pt1-ep.html#spacewar2b" rel="nofollow">http:&#x2F;&#x2F;www.masswerk.at&#x2F;spacewar&#x2F;inside&#x2F;insidespacewar-pt1-ep...</a>
jlg23over 9 years ago
No, but a well written program has the qualities of a good poem: You <i>want</i> to read it and it you <i>can</i> follow it easily. And every word is <i>exactly</i> where it belongs.<p>I still remember with how much pleasure I read Edi Weitz&#x27; cl-ppcre - as a print-out, in bed.<p>More than once I did minor changes to programs that I attributed to my OCD just to get positive feedback from peers that I made the program more readable (say, changing (let ((x ..)) (when x ....)) to (when-let ((x ...)) ....)).
评论 #10481188 未加载
joepvdover 9 years ago
Observing that the two (wonderful!) recitations as of yet are affiliated with perl, I am wondering what&#x27;s up with the rest...
ClayFergusonover 9 years ago
As a developer of 25 years in all my experience code that looked sloppy was indeed crappy at other layers other than appearance as well. A great developer takes as much pride in every letter of his code as any poet ever does. Moreso. If we get it wrong, it doesn&#x27;t work. If we do, however it ALWAYS does work right. Beautiful in that way.
dschiptsovover 9 years ago
It has very similar recursive process of clarification, refinement and simplification with the base case on what author thinks is &#x27;perfection&#x27; (local optimum).<p>map or filter procedures in Scheme or Haskell (written in terms of fold) are worth to be framed and posted on a wall.)
loser777over 9 years ago
Reminded me of this fantastic talk about demoscene programming called &quot;Poems for Bugs&quot;... <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=9ZNjB5jmHdE" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=9ZNjB5jmHdE</a>
branchlessover 9 years ago
Vogon poetry in most code bases.
评论 #10480933 未加载
mark_leeover 9 years ago
Really hard to answer because of the concept of poetry.Poessy?
BFayover 9 years ago
Linux Poetry is relevant: <a href="http:&#x2F;&#x2F;linuxpoetry.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;linuxpoetry.com&#x2F;</a>
efferifickover 9 years ago
Didn&#x27;t read the article but I wanted to share this quote I read once:<p>&quot;Mathematics is a language where truth rhymes&quot;.
rchover 9 years ago
E.E. Cummings might been writing code, with syntactically significant whitespace no less.
评论 #10480673 未加载
jlhimover 9 years ago
before it was called programming it was called poetical science.
Harimwakairiover 9 years ago
No, it isn&#x27;t.<p>Poetry is an entirely separate discipline with a long list of associated skills, <i>some</i> of which overlap with those possessed by a good programmer. You&#x27;re not a poet unless you&#x27;re a poet, so just call yourself a good coder for fuck&#x27;s sake. It&#x27;s not like it&#x27;s less prestigious.<p>source: published poet who works as a software engineer.
评论 #10481041 未加载
GlennSover 9 years ago
Immediately made me think of: <a href="http:&#x2F;&#x2F;steve-yegge.blogspot.co.uk&#x2F;2006&#x2F;03&#x2F;execution-in-kingdom-of-nouns.html" rel="nofollow">http:&#x2F;&#x2F;steve-yegge.blogspot.co.uk&#x2F;2006&#x2F;03&#x2F;execution-in-kingd...</a><p><pre><code> For the lack of a nail, throw new HorseshoeNailNotFoundException(&quot;no nails!&quot;); For the lack of a horseshoe, EquestrianDoctor.getLocalInstance().getHorseDispatcher().shoot(); For the lack of a horse, RidersGuild.getRiderNotificationSubscriberList().getBroadcaster().run( new BroadcastMessage(StableFactory.getNullHorseInstance())); For the lack of a rider, MessageDeliverySubsystem.getLogger().logDeliveryFailure( MessageFactory.getAbstractMessageInstance( new MessageMedium(MessageType.VERBAL), new MessageTransport(MessageTransportType.MOUNTED_RIDER), new MessageSessionDestination(BattleManager.getRoutingInfo( BattleLocation.NEAREST))), MessageFailureReasonCode.UNKNOWN_RIDER_FAILURE); For the lack of a message, ((BattleNotificationSender) BattleResourceMediator.getMediatorInstance().getResource( BattleParticipant.PROXY_PARTICIPANT, BattleResource.BATTLE_NOTIFICATION_SENDER)).sendNotification( ((BattleNotificationBuilder) (BattleResourceMediator.getMediatorInstance().getResource( BattleOrganizer.getBattleParticipant(Battle.Participant.GOOD_GUYS), BattleResource.BATTLE_NOTIFICATION_BUILDER))).buildNotification( BattleOrganizer.getBattleState(BattleResult.BATTLE_LOST), BattleManager.getChainOfCommand().getCommandChainNotifier())); For the lack of a battle, try { synchronized(BattleInformationRouterLock.getLockInstance()) { BattleInformationRouterLock.getLockInstance().wait(); } } catch (InterruptedException ix) { if (BattleSessionManager.getBattleStatus( BattleResource.getLocalizedBattleResource(Locale.getDefault()), BattleContext.createContext( Kingdom.getMasterBattleCoordinatorInstance( new TweedleBeetlePuddlePaddleBattle()).populate( RegionManager.getArmpitProvince(Armpit.LEFTMOST)))) == BattleStatus.LOST) { if (LOGGER.isLoggable(Level.TOTALLY_SCREWED)) { LOGGER.logScrewage(BattleLogger.createBattleLogMessage( BattleStatusFormatter.format(BattleStatus.LOST_WAR, Locale.getDefault()))); } } } For the lack of a war, new ServiceExecutionJoinPoint( DistributedQueryAnalyzer.forwardQueryResult( NotificationSchemaManager.getAbstractSchemaMapper( new PublishSubscribeNotificationSchema()).getSchemaProxy(). executePublishSubscribeQueryPlan( NotificationSchema.ALERT, new NotificationSchemaPriority(SchemaPriority.MAX_PRIORITY), new PublisherMessage(MessageFactory.getAbstractMessage( MessageType.WRITTEN, new MessageTransport(MessageTransportType.WOUNDED_SURVIVOR), new MessageSessionDestination( DestinationManager.getNullDestinationForQueryPlan()))), DistributedWarMachine.getPartyRoleManager().getRegisteredParties( PartyRoleManager.PARTY_KING || PartyRoleManager.PARTY_GENERAL || PartyRoleManager.PARTY_AMBASSADOR)).getQueryResult(), PriorityMessageDispatcher.getPriorityDispatchInstance())). waitForService(); All for the lack of a horseshoe nail.</code></pre>
agumonkeyover 9 years ago
I thought it was painting.<p>ps: among the APL examples from the article, I&#x27;d add most of the IOCCC submissions.
评论 #10482066 未加载
throwawayawayover 9 years ago
is up down?
clock_towerover 9 years ago
<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Betteridge%27s_law_of_headlines" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Betteridge%27s_law_of_headline...</a>
评论 #10481367 未加载