-2
votes
3answers
45 views

Method naming advice required [closed]

My question will be about how do you think it would be fit to name some methods in a fluent interface. Let me try to demonstrate the problem. Consider this relation tree: A person can have dogs ...
1
vote
1answer
135 views

What do you call a method that might do something? [closed]

Is it okay to call it void maybeGenerateUIDsAndDownload() ? Because sometimes it will generate UIDs and download but sometimes it will not do it.
4
votes
4answers
294 views

Why is the following naming guideline different between OO and non-OO languages?

I am working with a non-OO language and I'm trying to name my routines consistently. I came acrross the following guideline from Steve McConnell's Code Complete: To name a procedure, use a strong ...
-1
votes
2answers
133 views

Naming methods that perform HTTP GET/POST calls? [closed]

In the application I am currently working on, there are generally 3 types of HTTP calls: pure GETs pure POSTs (updating the model with new data) "GET" POSTs (posting down an object to get some data ...
1
vote
2answers
257 views

Which is architecturally correct for Data Access Layer method names - Fetch or Select? [closed]

I have seen the words Fetch and Select used seemingly interchangeably when naming data access layer methods (ex. Person.Select or Person.Fetch). Which one is correct? My instinct is that the ...
1
vote
6answers
349 views

Naming functions that retrieve a value

I have this personal rule to start all function/method names with a verb. My verb of choice for functions or methods that get a value based on some data structure or object is get. I'm wondering if ...
0
votes
2answers
112 views

addIfNotExist alternative

Is there are any standards or conventions on naming methods which add something if it not exist into another something. For example: Store.instance().addItemIfNotExist(item) IfNotExist is really ...
13
votes
8answers
790 views

How and why to decide between naming methods with “get” and “find” prefixes

I always have trouble figuring out if I should name a certain method starting with getSomething versus findSomething. The problem resides in creating helpers for poorly designed APIs. This usually ...
4
votes
2answers
768 views

Naming methods that do the same thing but return different types

Let's assume that I'm extending a graphical file chooser class (JFileChooser). This class has methods which display the file chooser dialog and return a status signature in the form of an int: ...
3
votes
2answers
291 views

Better use on the name of variables

I have a method that looks like this: Public Function NormalizeStreetAddress(country As Namespace.Country, streetAddress As Namespace.StreetAddress) _ ...
5
votes
5answers
287 views

Is it good or bad form to name a function after the workaround it fixes?

Lets say you have to write some code to fix a bug that on first glance by another engineer would seem weird or unnecessary. Would it be good or bad form to put the code in a method named for example ...
1
vote
1answer
79 views

Contrary method subjects for identical method names

I've got method naming paralysis! Say I've got one class - "System", and another class "User". Now, if I want to notify user(s), I can call: // this method can notify individuals and collections of ...