Spaghetti Code

Code Structure


description

Spacing

Programmers use spacing to make their code more readable. Implementing proper spacing requires little effort, but makes code even easier to understand.
Line spacing denotes a separation of instructions using 'newline' characters (hitting Enter on the keybaord several times). Programmers should put space between any 'sets' of instructions with different purposes. Most often these purposes fall into categories like creating variables, naming a function, or performing computations. Each set of instructions should have space between them to further clarify which instructions belong together.
Now that we implemented proper spacing and indenting, the code looks clean and aesthetically pleasing. But, not everyone can understand what it does. Good programmers use comments to make code understandable. Let's take a look at good commenting next.