createOrUpdateMeeting() vs createMeeting(). Which one do you choose and why?

3 years ago by JokersPistol to c/experienced_devs

Which one is easier to develop and work with (which saves the most time)? Which one would you go for? The name of the API represents its true purpose in this case by the way, createOrUpdate creates or updates the passed in meeting and create just creates the meeting. I will be the only one working on this project for now, although obviously, I would like others to work on it with me eventually.

load all comments
Joe 5 points 3 years ago

I would have 2 functions: createMeeting and updateMeeting

No point having one function do two different things, especially if one of them isn't even hinted at by the function name

path: 0 301713, hotness: undefined, score: 5, children: 0
experienced_devs
experienced_devs

@programming.dev

login for more options
5739
97
190

A community for discussion amongst professional software developers.

Posts should be relevant to those well into their careers.

For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:

go to feed...