Best Practices for Clean Code Development

Slide Note
Embed
Share

Learn about key principles in software engineering such as DRY (Don't Repeat Yourself), WET (Waste Everyone's Time), Rule of Three, KISS (Keep it Simple Stupid), and more. Understand the importance of staying out of the rain by following practices like separation of concerns, single source of truth, and You Aren't Going to Need It (YAGNI). Improve code quality by adhering to these principles and guidelines.


Uploaded on Aug 14, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Handing your Code an Umbrella, Keeping it DRY Sarah Klinefelter

  2. What is DRY principle? In software engineering, don't repeat yourself (DRY) is a principle of software development, aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures

  3. W.E.T. Waste Everyones Time We Enjoy Typing Write Everything Twice

  4. How to Stay Out of the Rain Single Source of Truth / Abstraction Single Point of Truth You Aren t Going to Need It (YAGNI) Rule of Three K.I.S.S. Separation of Concern / Single Responsibility

  5. Rule of Three Simply put: If you have identical code in 3 or more places, it should be abstracted into a common method, class, etc. to be reusable and easily maintainable.

  6. K.I.S.S. Keep it simple stupid! Don t cram too much into one little method or function Clean design leads to clean code Beware of Code Smell ...a surface indication that usually corresponds to a deeper problem in the system.

  7. Separation of Concern / Single Responsibility Separating code into distinct sections Having loosely coupled layers Separating UI from data layer Separating App layer from integration layer

  8. Single Source of Truth (SSOT) Single Point of Truth (SPOT) A way of architecting models and data so that every data element is stored exactly once Using relational schemas instead of duplication

  9. You Arent Going To Need It (YAGNI) Removal of commented out code Removal of dead / unused code You should be using source control so this shouldn t be scary Cuts down on package bloat

  10. THANK YOU!

Related


More Related Content