Coding best practices: Difference between revisions

Content deleted Content added
Fdefect (talk | contribs)
Improved readability
m Keep the code simple: '3rd' -> 'third'
Line 181:
Compactness can allow coders to view more code per page, reducing scrolling gestures and keystrokes. Given how many times code might be viewed in the process of writing and maintaining, it might amount to a significant savings in programmer keystrokes in the life of the code. This might not seem significant to a student first learning to program but, when producing and maintaining large programs the reduction of how many lines of code there are allows for more of the code to fit on screen, minor code simplification may improve productivity{{dubious|date=December 2017}}, and also lessen finger, wrist and eye strain, which are common medical issues suffered by production coders and information workers.<ref>{{cite web|title=Repetitive Strain Injury|url=http://web.eecs.umich.edu/~cscott/rsi.html|accessdate=30 October 2016}}</ref>
 
Terser coding speeds compilation very slightly, as fewer symbols need to be processed. Furthermore, the 3rdthird approach may allow similar lines of code to be more easily compared, particularly when many such constructs can appear on one screen at the same time.
 
Finally, very terse layouts may better utilize modern wide-screen computer displays, depending on monitor layout and setup. In the past, screens were limited to 40 or 80 characters (such limits originated far earlier: manuscripts, printed books, and even scrolls, have for millennia used quite short lines (see for example [[Gutenberg Bible]]). Modern screens can easily display 200 or more characters, allowing extremely long lines. Most modern coding styles and standards do not take up that entire width. Thus, if using one window as wide as the screen, a great deal of available space is wasted. On the other hand, with multiple windows, or using an IDE or other tool with various information in side panes, the available width for code is in the range familiar from earlier systems.