COMPUTER PROGRAMMING FUNDAMENTALS
WHAT IS PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
To keep code readable and organized for Code.org.
|
|
There is no purpose, it just looks nice.
|
|
It’s the only way the code will work.
|
|
To keep code readable and organized for others.
|
Detailed explanation-1: -definition of good code: “Good code is written so that is readable, understandable, covered by automated tests, not over complicated and does well what is intended to do.”
Detailed explanation-2: -Use consistent formatting & indentation. Use clear variable and method names. Use comments where necessary. Use the DRY principle (Don’t Repeat Yourself)
Detailed explanation-3: -Commenting involves placing Human Readable Descriptions inside of computer programs detailing what the Code is doing. Proper use of commenting can make code maintenance much easier, as well as helping make finding bugs faster. Further, commenting is very important when writing functions that other people will use.
Detailed explanation-4: -1. Code indentation. Proper indentation is the most important thing you can do to ensure that your code is readable and easy to understand.