156: Commented

Explain xkcd: It's 'cause you're dumb.
Revision as of 21:15, 3 August 2012 by Rikthoff (talk | contribs) (Description)
Jump to: navigation, search

Template:ComicHeader

commented.png

Image Text

Your IDE's colors may vary.

Description

The title of this comic refers to "Commenting", which is a way to add clarification to programming code. This is mostly done to make said code maintainable. Instead of all the dry programming statements, a coder can insert non-programming sections which clarify the way the programming statement, or combination of statements, is meant to work. This way, another coder that needs to update the code will have a better understanding of the structure and meaning of the code, which will allow him/her to implement the change faster. Also, comments are used to indicate changes to code, or comment out certain sections of code that went obsolete when revising the code into a newer version.

In the comic, Cueball is struck against BlackHat's Classhole attitude. This time, when asking a favor, BlackHat simply "comments out" Cueball's request by holding up two fingers in a skewed way. They then correspond to one way of adding comments to code, namely by two forward slashes ("//").

The Image Text refers to most modern Integrated Development Environments (or IDE's) that colorcode different sections in the code, such as variables, loops and nested statements, to add readability. Green, I suppose, is one way to color comments. Hence, the color may vary on which IDE you use (and offcourse, your own preferences set in that IDE).