I was studying Mediator Pattern and I noticed that to use this pattern you should register the Colleagues into Mediator from the Colleague concrete classes. for that we have to make an instance of Mediator inside Colleague concrete classes which violates IoC and you can not inject the Colleagues into Mediator  (as far as I know! whether it is right or wrong)

Questions:

1- Am I right about the thing I said?

2- Shall we always use IoC at all or there are some times you can forget about it?

3- If we always have to use IoC, can we say Mediator is an anti-Pattern?


Why do developers ask "why" when someone asks them how to implement a solution?

Because it requires more knowledge to evaluate whether a solution is appropriate than it does to actually implement the solution.
It's very difficult to believe someone when they say, "I don't know how to do this, but I know for sure it's what I need to do."  Programmers constantly insist on probing deeper because people constantly insist on asking the wrong questions.  Yes, sometimes it eventually comes back around to your original question, but not always.
As an analogy, imagine if someone walked up to a mechanic and asked him how to replace a car battery.  Usually if you're qualified to diagnose a defective battery, you're qualified to change one, so the mechanic will ask how you know it needs replacing.
He knows if he doesn't do this, and it turns out you don't need a battery, then you'll keep coming back asking more and more questions until eventually you figure out that you have to turn the lights off when the engine's not running.  By asking you up front, it feels like he's wasting your time, but really he knows from experience that he's potentially saving both of you a lot more time.
So, if you want to avoid the line of questioning, you need to convince him up front that you know what you're talking about.
