code comments

Content type
Contributor
Year
Publisher
Language
Publication Type
Record Status
Description (in English)

## READ WRITE GARDEN ## is an erasure poem by J. R. Carpenter carved out of Ruby code and code comments by Caden Lovelace. This text was created for The Ill-Tempered Rubyist, an international anthology of poems involving computer languages, especially the RUBY language, hand-made and edited by Karen Randall in honor of the Millay Colony‘s ruby anniversary.

Pull Quotes

#### we want to split
#### our text into units
####
#### punctuation marks allow us
#### to treat them as words
####
#### consider the ellipsis
#### for example
####
#### spaces
#### on either side of certain

def tokenize_texts(texts)
return texts.map do |text|
text.gsub!(/(\w)([,.:;\/?!]|\.\.\.+)(\W)/i, ‘\1 \2 \3′)
text.split(‘ ‘)
end
end

#### words often come
#### after other words
####
#### we walk through our garden
#### counting pairs

def generate_frequency_table(tokenized_texts, n)
frequency_table = {}
tokenized_texts.each do |text|
text.each_with_index do |word, i|
if i+2 < text.length
# is there a word after this one?

end
end

Screen shots
Image
## READ WRITE GARDEN ### || J. R. Carpenter
Image
## READ WRITE GARDEN ### || J. R. Carpenter
By Patricia Tomaszek, 7 July, 2012
Language
Year
License
All Rights reserved
Record Status
Abstract (in English)

Where in source code do we locate the "extra-functional significance" that Critical Code Studies calls us to critique? One starting point is in code comments. In most programming languages, comments are simple marks that set aside text for humans to read but computers to ignore. The act of "commenting" and "uncommenting" circulates this text into and out of the code per se, which is to say into and out of the purview of the compiler / interpreter. Like footnotes or endnotes, code comments are paratexts — continuous with and yet set apart from the source. Where they serve as actual *commentaries*, these paratexts enabling programmers to signal intentions, record histories, and render aesthetic judgements: comments enable the vital processes of software development culture.

Code comments locate the affective in code, attaching moments of rage or humor or joy attaches to points of functionality. They also assert significance, including statements of copyright, expressions of suspicion and doubt, or descriptions of future plans and aspirations. Comments are part of a vernacular, with their own folk traditions and lore. They are also the subject of aesthetic debates within software engineering cultures, whether simple preferences for minimalist / maximalist commentary or full philosophies and methodologies such as "literate programming" and "self-documenting code." Comments serve a rhetorical function as a figure for code in discourse outside code-literate culture. In public political and legal debates — from investigative reporting into "Climategate" code to the court cases over the legal status of Linux source in "SCO v. IBM" — comments serve as evidence, not just as a shorthand for code *functionality*, but as the essence of code *intentionality*.

Source: Author's abstract in conference proceedings

Multimedia
Remote video URL
By Eric Dean Rasmussen, 22 June, 2012
Language
Year
Record Status
Abstract (in English)

We consider how authors have added comments to electronic literature and how the facility for commenting code has been, and could be, used in unconventional yet productive ways by those working in the literary arts. Our central example is a gloss that we wrote, using JavaScript comments, to discuss the code for our poetry generator, “Sea and Spar Between”: http://blogs.saic.edu/dearnavigator/winter2010/nick-montfort-stephanies… between/ As this generator is offered for anyone to use in future projects, it was originally written with some JavaScript comments to facilitate reuse. These were extensively expanded in an edition of the poem we call “cut to fit the toolspun course,” now under consideration for a special issue of Digital Humanities Quarterly on “The Literary.” The issues we encountered in writing this extensive, poetic gloss using comments will be central to our discussion.

In our presentation, we will contextualize our gloss within the history of creative programming and consider how others have written different sorts of comments. We consider, for instance, how comments are used in hobbyist BASIC programming of the 1970s and early 1980s, how comments are generally absent from obfuscated programs, how comments have been used in HyperCard and other languages that have particularly supported creative programming, and how comments have been creatively used in markup as well as programming languages.

The uses of comments in creative programming include straightforward ones that are intended to help people, including the original programmer, understand the technical aspects of a program during and after development.
Comments can be avoided, or used to confuse code with comments, in order to obfuscate a program further and to make it more enjoyable to figure out. They can also be used to hide messages, to make in-jokes, or to provide a new layer of discussion for those who look beneath the interface.

Programming languages that were originally created for scientific, research, and industrial purposes have been turned to literary purposes by programmers working poetically and aesthetically. Similarly, the ability to place comments within programs – a feature not originally intended for poetic glossing or critical discussion has been used in new ways by creative programmers. Electronic literature authors and others have shown some surprising capabilities of the comment, revealing new possibilities for our relationship with code and computing.

(Source: Author's abstract, 2012 ELO Conference site)

Creative Works referenced