- The DRY principle means 'Don't Repeat Yourself', which discourages repeating code within a program.
- A function doing one this does NOT meant that it should only have one line of code. It means that a function should have one goal that it does, and it does that goal in a small amount of code. That does mean it will often take multiple lines.
- While the arguement has merit, it is ultimately more effecient to leave the code within a function. As long as the function is named well, then the code block it is called in will be much more readable, since the code is described and executed in one line rather than a large chunk of code that would clutter up the surrounding code.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|