Alex Rivera | Logout

Trouble coming up with good names for functions

Asked 2009-06-11T03:08:10.097
21

So, I often have trouble describing a function in a succinct name. It's usually not a problem in functions that are made for reuse, but often a large process needs to be broken into sub-functions. Often these get strange names, such as connectionsToAccessLines or handleWallVisionSplit or something like that. And while these functions only do one thing, it's very tough to come up with a good name for them because they really are just one part of a larger algorithm.

What do you do in this situation? It's very frustrating.

Edit
Report

1 Answer

0

When you run out of sensible names, just use letters of the alphabet. Once you run out of those, pick random words from the dictionary. This way, they can never fire you, because you're the only one who understands the code.

answered 2009-06-11T05:19:08.337

Your Answer