Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Computer programming
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Anti-spam check. Do
not
fill this in!
===Readability of source code=== In computer programming, [[readability]] refers to the ease with which a human reader can comprehend the purpose, [[control flow]], and operation of [[source code]]. It affects the aspects of quality above, including portability, usability and most importantly maintainability. Readability is important because programmers spend the majority of their time reading, trying to understand, reusing, and modifying existing source code, rather than writing new source code. Unreadable code often leads to bugs, inefficiencies, and [[Code duplication|duplicated code]]. A study found that a few simple readability transformations made code shorter and drastically reduced the time to understand it.<ref>{{cite journal|doi=10.1145/358589.358596|title=Improving computer program readability to aid modification|journal=Communications of the ACM|volume=25|issue=8|pages=512β521|year=1982|last1=Elshoff|first1=James L.|last2=Marcotty|first2=Michael|s2cid=30026641|doi-access=free}}</ref> Following a consistent [[programming style]] often helps readability. However, readability is more than just programming style. Many factors, having little or nothing to do with the ability of the computer to efficiently compile and execute the code, contribute to readability.<ref>{{cite web|url=http://docforge.com/wiki/Readability|title=Readability|author=Multiple (wiki)|work=Docforge|url-status=live|archive-url=https://web.archive.org/web/20200429211203/http://www.docforge.com/wiki/Readability|archive-date=2020-04-29|access-date=2010-01-30}}</ref> Some of these factors include: *Different [[indent style]]s (whitespace) *[[Comment (computer programming)|Comments]] *[[decomposition (computer science)|Decomposition]] *[[Naming conventions (programming)|Naming conventions]] for objects (such as variables, classes, functions, procedures, etc.) The [[separation of presentation and content|presentation]] aspects of this (such as indents, line breaks, color highlighting, and so on) are often handled by the [[source code editor]], but the content aspects reflect the programmer's talent and skills. Various [[visual programming language]]s have also been developed with the intent to resolve readability concerns by adopting non-traditional approaches to code structure and display. [[Integrated development environment]]s (IDEs) aim to integrate all such help. Techniques like [[Code refactoring]] can enhance readability.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Computer programming
(section)
Add topic