Writing Readable Code for Humans
Code doesn't only need to be read by computers, humans need to be able to read it too. That's because a lot of programs end up being adapted later and if someone can't go through it and easily make those changes then the program is useless. The first way to make programs easy to read is to put each part of the code on its own line. Next, you should ensure that if code is nested the internal coding is indented. You should also leave white spaces between numbers and string, etc so each line is easier to scan. Comments are notes that programmers leave to each other in the programming script that the computer ignores. There are several ways to "comment" out parts of the program (see below.) Use comments to explain what each part of the program (and the whole thing) is doing and/or for.
Â
![A table of code to help make comments.](https://static.wixstatic.com/media/b86045_869aeccf62474ee79f2f446800517148~mv2.png/v1/fill/w_602,h_164,al_c,q_85,enc_auto/b86045_869aeccf62474ee79f2f446800517148~mv2.png)