Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 7
    I disagree that ReturnEmployeeName(57) makes it immediately obvious that 57 is the ID. GetEmployeeById(57) on the other hand... Commented Jan 19, 2016 at 13:52
  • @HugoZink I initially wanted to use something like that for the example, but I intentionally changed it to ReturnEmployeeName to demonstrate cases where even without explicitly mentioning the parameter in the method's name, it's fairly reasonable to expect people to figure what it is. At any rate, it's noteworthy that unlike ReturnEmployeeName, you can't reasonably rename ReturnEmployeeIds to something that indicates the meaning behind the parameters. Commented Jan 19, 2016 at 14:56
  • 1
    In any case, it's pretty unlikely that we would write ReturnEmployeeName(57) in a real program. It's far more likely that we would write ReturnEmployeeName(employeeId). Why would we hardcode an employee ID? Unless it's the programmer's ID and there's some sort of fraud going on, like, add a little to this employee's paycheck. :-) Commented Jan 20, 2016 at 4:06