Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Clean code recommends to name methods to be a verb, and classes to be a noun.

I am developing an c++ application using boost::signal as some kind of event framework, and have defined various events, but naming them to make the code cleaner seems to be problematic.

So, how to name event types?

share|improve this question
up vote 6 down vote accepted

Other naming options may include:

Format 1: On[Objectname][DetailedEventName]




Format 2: On[DetaieldConditionName]




Other posts related to this: StackOverFlow-EventNames

share|improve this answer
Hehe defnitly the better way :-) – Smokefoot Feb 27 '12 at 11:53

Robert C. Martin mentioned that your names have to be meanful and searchable. It should be a verb or a verb phrase. So from my point of view I would allways clarify that this method is a event by building a verb phrase.

Some examples could be: - SaveEvent() - RenderEvent() - CloseEvent()

Whit this format I am allways able to find the Event-Method. I know exactly that this method is a event and I dont need to seach for some points that let me know that this method is a event.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.