This question already has an answer here:
I'm writing a factory class for a Selenium Web Driver and I came across a choice that I couldn't figure out which is cleaner. Having two methods with the same parameter.
GetWebDriver(string browser) GetRemoteWebDriver(string browser)
or adding a boolean parameter
GetWebDriver(string browser, bool isRemote)
I would think in this case the first option might be better because there is very likely no reason I need to extend it to more than a boolean of choices and hence two methods. On the other hand, I can see the second one to better for when there is more than two choices or likely many extensions in the second parameter in the future.
Which would you choose for Cleaner Code and why?