4
alegro
7y

I asked a new coworker to implement an interface that included an event.

He proceeded to write the implementation and subscribe to the event in the constructor...

When asked why.. he responded with we should know when the event fires.

Comments
  • 0
    That is not that bad of an idea to subscribe a logger to the event on the constructor
  • 0
    I am sure there are use cases... And in that case the logging logic should be on the raiser? There was really nothing other than the interface definitions, the constructor and the subscription. It was attributed to lack of understanding. Just thought it was interesting someone with "experience" would do that with out an explanation.
Add Comment