Expression: How Comments Convey Feelings

Comments also communicate in a way that goes beyond practical or useful: they tell us how the programmer feels. Code comments are one of the least "writing-y" forms of writing—grammar rules don't matter, nobody critiques the writing style—so they are a very unfiltered, unedited window into the programmer's mind.

IMG_6071.JPG

Code from an FSU group project.

Here, in a group project environment, this comment serves no technical purpose. Students often use code documents as a form of mission log, expressing their feelings at various points in the process. This time, the student feels defeated by their inability to make things work. Just as comments can be used for documentation of the code itself, here the student documents their feelings.

IMG_6075.JPG

Code from an FSU assignment.

The second comment here expresses a unique combination of relief and confusion. The student has successfully made their code work through brute force, trying and trying again until suddenly they succeeded. Programming students know this feeling well, but it is hard to express in terms of other fields, where solutions are hard to simply happen upon. The student says it well: "Only god knows how this works now."

Programmers are often depicted as singularly focused on their work—in movies, they are shown huddled over a computer with a cup of coffee for hours at a time. But this stereotype fails to convey the importance of collaboration and communication for good software engineering. Like in any other field, no one person is truly capable of doing everything by themself; at some point, they will reach their limits. Code comments exist at the edges of these limits: they show where programmers' weaknesses and strengths diverge, or simply where their mood shifts from productive to desperate. Comments sometimes only exist for a few days at a time—many students go through their documents and clean them up to remove any profanities or embarrassing mistakes before submitting an assignment. This makes them all the more important to notice: they are a temporary, fleeting, yet completely honest snapshot of the people behind the process.

Expression