loading...

re: Writing Good Method & Variable Names VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Loved this, thank you! I've been ranting about a method I found in one of our old libraries for the last couple of weeks. GetIdById(), really? Wh...
 

You write that it is a method, not a standalone function. So it belongs to an object, probably an object of type Patient. So what about calling it GetIdByChartId()? It makes no sense to put information into a name that is obvious from the context.

 

Because it was a standalone function. I tend to use method and function interchangeably when I really shouldn't.

code of conduct - report abuse