"value":"\n <p>When learning to code, one of the most confusing things was using short variable names in documentation and other people's code.<\/p>\n\n<p>Things like <code>$k<\/code> and <code>$v<\/code> instead of <code>$key<\/code> and <code>$value<\/code> within loops, <code>$i<\/code> instead of <code>$index<\/code>, or <code>$e<\/code> when working with Exceptions.<\/p>\n\n<p>I've also seen slightly better names, such as <code>$idx<\/code> for index or <code>$ctx<\/code> for context.<\/p>\n\n<p>But what does this achieve?<\/p>\n\n<p>Why not write the full variable name and clarify what it refers to?<\/p>\n\n<p>It would be easier to read and understand for anyone reading the code, including Junior Developers and people new to your team or application.<\/p>\n\n<p>There are no limitations - at least in the languages I use - to force this, such as a maximum number of characters in a file, so why not write the full variable name?<\/p>\n\n<p>The only reason I can think of is to save time by pressing fewer keys, but code is read more than written, so it should be optimised for readability.<\/p>\n\n<p>Your tests and CI pipeline don't have a preference.<\/p>\n\n<p>The people reading the code will.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>When learning to code, one of the most confusing things was using short variable names in documentation and other people's code.<\/p>\n\n<p>Things like <code>$k<\/code> and <code>$v<\/code> instead of <code>$key<\/code> and <code>$value<\/code> within loops, <code>$i<\/code> instead of <code>$index<\/code>, or <code>$e<\/code> when working with Exceptions.<\/p>\n\n<p>I've also seen slightly better names, such as <code>$idx<\/code> for index or <code>$ctx<\/code> for context.<\/p>\n\n<p>But what does this achieve?<\/p>\n\n<p>Why not write the full variable name and clarify what it refers to?<\/p>\n\n<p>It would be easier to read and understand for anyone reading the code, including Junior Developers and people new to your team or application.<\/p>\n\n<p>There are no limitations - at least in the languages I use - to force this, such as a maximum number of characters in a file, so why not write the full variable name?<\/p>\n\n<p>The only reason I can think of is to save time by pressing fewer keys, but code is read more than written, so it should be optimised for readability.<\/p>\n\n<p>Your tests and CI pipeline don't have a preference.<\/p>\n\n<p>The people reading the code will.<\/p>\n\n ",