Editing 1513: Code Quality
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
==Explanation== | ==Explanation== | ||
− | + | <!-- °\_/° --> | |
− | + | {{incomplete| Needs fine-tuning and explaining of Ponytail's three comments}} | |
− | |||
− | |||
− | |||
− | |||
+ | Ponytail is about to look at some source code Cueball has written, and he is warning her that he is self-taught so his code probably won't be written the way she is used to. Although few programming languages require a perfectly rigid style so long as the code is syntactically accurate, most programmers follow some sort of {{w|Programming_style|style}} to make the code easier to read. This includes indenting lines to show levels and using descriptive variable identifiers with {{w|CamelCase|CamelCase}} (or camelCase) or {{w|Snake case|snake_case}} capitalization (capitalizing each word except for the first, and separating lowercase words with underscores, respectively). | ||
− | + | In spite of Ponytail's initial (polite) optimism, she comments in three increasingly harsh and absurd similes. Firstly, she suggests that reading his code is like being in a house built by an unskilled child, using a small axe to put together what he thought was a house based on a picture. Secondly, she suggests that it looks like a salad recipe, written by a corporate lawyer (who are notoriously difficult to understand), on a phone with autocorrect that only corrected things to formulas from Microsoft Excel (which are notoriously complicated). Thirdly, she suggests that it is a transcript of the dialogue of couple arguing at {{w|IKEA}} (a world-wide chain of furniture stores which feature large, maze-like showrooms as well as a large warehouse area where you can pick up the furniture you want to buy in flat, some-assembly-required packaging; especially on weekends when many people crowd in to a store, they can be stress-inducing places), the transcript of which was then randomly edited until the computer compiled it with no errors. | |
− | + | Finally, Cueball surrenders and makes the rather weak assurance that he will read “a style guide”. | |
− | + | A common technique for self-taught programmers is to follow and adapt tutorials, and to find examples of similar problems being solved and try to copy the code. This can lead to code that is hard to follow or otherwise "messy" as various different pieces of code are {{w|Jury_rig|jury-rigged}} together and tinkered with until they seem to work. Once a piece of code is working, it is usually considered too hard to go back and rewrite it to be cleaner or clearer, also at the risk of breaking something that has been working. This practice is known as {{w|refactoring}} and code projects that incorporate cycles of refactoring tend to be easier to read and maintain than those that don't. | |
− | + | The title text refers to {{w|emoji}}, or "smiley faces". They exist in Unicode, or can be simulated using ASCII characters. Many languages will allow variable names to include underscores, so a variety of sad face ASCII emoji will be legal variable names, such as <code>T_T</code>, <code>p_q</code>, <code>ioi</code> etc. Progressively more possible crying-face emoji are possible if variables can include [http://hexascii.com/sad-emoticons/ UTF-8 characters] or full Unicode. To this end, Ponytail is implying that at least a portion of, and possibly most or all of Cueball's variables were emoji variables. | |
− | + | In the realm of Unicode, there are many crying emojis, as the comic states (e.g. 😢,😭,😂,😿,😹) In most programming languages it would be impossible to use them in variable names, as the symbols would break the language's syntax rules. Notable exceptions to this are {{w|Go (programming language)|Go}} and {{w|Swift (programming language)|Swift}}, Apple's new programming language, in which the code can understand and use emojis in variables. Java, as another example, allows unicode characters in variable names as long as they are letter, numeric, combining or non-formatting marks. (See [http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8] and [http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#isUnicodeIdentifierPart%28int%29]). Also, some C++ compilers support foreign Unicode characters and can have emoji in that manner. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Transcript== | ==Transcript== | ||
− | :[Cueball showing Ponytail his laptop | + | :[Cueball showing Ponytail his laptop] |
:Cueball: Keep in mind that I'm self-taught, so my code may be a little messy. | :Cueball: Keep in mind that I'm self-taught, so my code may be a little messy. | ||
:Ponytail: Lemme see - I'm sure it's fine. | :Ponytail: Lemme see - I'm sure it's fine. | ||
− | :[Ponytail sits at desk | + | :[Ponytail sits at desk] |
:Ponytail: ...Wow. This is like being in a house built by a child using nothing but a hatchet and a picture of a house. | :Ponytail: ...Wow. This is like being in a house built by a child using nothing but a hatchet and a picture of a house. | ||
− | |||
:Ponytail: It's like a salad recipe written by a corporate lawyer using a phone autocorrect that only knew Excel formulas. | :Ponytail: It's like a salad recipe written by a corporate lawyer using a phone autocorrect that only knew Excel formulas. | ||
− | |||
:Ponytail: It's like someone took a transcript of a couple arguing at IKEA and made random edits until it compiled without errors. | :Ponytail: It's like someone took a transcript of a couple arguing at IKEA and made random edits until it compiled without errors. | ||
:Cueball: '''''Okay,''''' I'll read a style guide. | :Cueball: '''''Okay,''''' I'll read a style guide. | ||
− | |||
− | |||
− | |||
{{comic discussion}} | {{comic discussion}} | ||
+ | <!-- Include any categories below this line. --> | ||
− | |||
− | |||
[[Category:Comics featuring Cueball]] | [[Category:Comics featuring Cueball]] | ||
[[Category:Comics featuring Ponytail]] | [[Category:Comics featuring Ponytail]] | ||
− | |||
− | |||
− | |||
− | |||
− |