The Importance of
Documentation in Programming
Why is it important?
Without documentation, programs
may be confusing and/or make no
sense.
va r sla ying = t rue ;
va r youH it = M a t h.f loor (M a t h.ra ndom () * 2);
va r da m a ge ThisRound = M a t h.floor (...
Commenting
Comments can be their own line or
added to the end of a string.
Commenting
Comments can be used as a form of pseudocode to
outline intention prior to writing the actual code. In
this cas...
Commenting in various languages
Javascript / /
Visual Basic
C / * */
‘
General Rules for Commenting
Not every line should be commented, but any line that
performs an operation should.
Any line ...
Upcoming SlideShare
Loading in...5
×

The Importance of Documentation in Programming

469

Published on

COMPUTER PROGRAMMING 6421

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
469
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

The Importance of Documentation in Programming

  1. 1. The Importance of Documentation in Programming
  2. 2. Why is it important? Without documentation, programs may be confusing and/or make no sense.
  3. 3. va r sla ying = t rue ; va r youH it = M a t h.f loor (M a t h.ra ndom () * 2); va r da m a ge ThisRound = M a t h.floor (M a t h.ra ndom () * 5 + 1); va r t ot a lD a m a ge = 0; w hile (sla ying) { if (youH it ) { c onsole .log("You hit t he dra gon a nd did " + da m a ge ThisRound + " da m a ge !"); t ot a lD a m a ge + = da m a ge ThisRound ; if (t ot a lD a m a ge > = 4) { c onsole .log("You did it ! You sle w t he dra gon!"); sla ying = f a lse ; } e lse { youH it = M a t h.f loor (M a t h.ra ndom () * 2); } } e lse { c onsole .log("The dra gon burnina t e s you! You' re t oa st ."); sla ying = fa lse ; }} ?
  4. 4. Commenting Comments can be their own line or added to the end of a string.
  5. 5. Commenting Comments can be used as a form of pseudocode to outline intention prior to writing the actual code. In this case it should explain the logic behind the code rather than the code itself.
  6. 6. Commenting in various languages Javascript / / Visual Basic C / * */ ‘
  7. 7. General Rules for Commenting Not every line should be commented, but any line that performs an operation should. Any line that causes confusion should be commented. At the top of the program there should be comments on its purpose and scope of the program. Another common comment is a last revised date and version number at the top of the program.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×