Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Share my ignorance day
Message
 
 
À
04/01/2019 10:33:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01664647
Message ID:
01665121
Vues:
59
>>Don't Repeat Yourself
>- as in don't repeat code (unless it is trivial)...have not done that for decades :-)

Actually that is not entirely true. The repeating part does not talk about the code, but about the business logic.

So you can certainly repeat the same code in different places, sometimes this is even an advantage, because it may evolve independently of each other.
The focus point is the "Knowledge part":

"Every piece of knowledge must have a single, unambiguous, authoritative representation within a system"

So you have a code that checks if an invoice is paid, this logic must only exist once.

>
>>You Ain't Gonna Need It
>- this one I don't get - explain?

While you are at it, just implement this feature that may be needed in the future: The problem here is:

- You don't know if it will indeed be needed in the future
- If it will be needed you don't know if it is going to be exactly as you envision right now
- You have more important things to do right now
- Your code becomes needlessly more complex and harder to maintain
- You cannot test it properly because it is not fully impemented
- When you really are going to need it you need extra time again to understand your original train of thought.
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform