Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Troubles with the function name
Message
 
 
À
28/10/2008 21:22:40
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01357748
Message ID:
01357909
Vues:
15
>>>>Hi everybody,
>>>>
>>>>I'm having a hard time of finding a proper name for the function and for me it usually means I'm stack and can not proceed with the next step of actually writting the code.
>>>>
>>>>I have a pool of records I'd like to distribute. Before doing this, though, I want to update a flag in that records' pool to distribute them correctly. This process I need to do for each user.
>>>>
>>>>So, at the moment I'm stack because I need to name that function.
>>>>
>>>>Ideas, please?
>>>
>>>MarkForDistribution()
>>
>>You know, I think I had the same idea in my mind too. Forgot why I decided against it.
>
>Length? MarkToDispatch() then? Triage()?
>
>Generally, I think we're better off, coming from verb-oriented languages, and thinking in verbs (and DoNoun() is not a verb, IMO). My general rule is that a method should do something, so its name should be a verb (in imperative, at least was in Serbian, where it was morphologically different from infinitive), possibly a verb plus object - .Refresh() or .RefreshPillows(). Another rule is that if I can't come up with a good name as an answer to "what does this method do? - it ~~~s", then my design is unfinished, I still don't know what I'm doing, and it's probably too early to write code. Rethink the design.

Sometimes it's just hard to find a right word. Say, we have another process when we want to assign a record some mark indicating that this record has better probability of being successful and should have been worked first. The question is - how should we name this flag and the process? Currently we're using set priorities, but it doesn't reflect the exact idea.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform