Menu

Ids and Ambiguous Method Parameters

March 14, 2010

You’ve probably run into a method with a signature like: void addToGroup(long userId, long groupId) and a common question you might ask yourself is, “Oh, was it the user id first, or the group id first? I always forget. Stupid method.” You’ve encoded the meaning of the parameters into their names, and hence you need… Read more