Question: assume you have a function that polls some kind of queue and blocks for a certain amount of time. If this time has passed without something showing up on the queue, some indication of the timeout should be delivered to the caller, otherwise the something that showed up should be returned.

Now you could write something like:

```
class Queue
{
    Thing GetThing();
}

```

and throw an exception in case of a timeout. Or you
write

```
class Queue
{
    int GetThing(Thing& t);
}

```

and return an error code for success and timeout.

However, drawback of solution 1 is that the on a not so busy queue timeout is not an exceptional case, but rather common. And solution 2 uses return values for errors and ugly syntax, since you can end up with a `Thing` that contains nothing.

Is there another (smart) solution for that problem? What is the preferred solution in an object oriented environment?

Answer: 
You may want to take a look at the tool [Reflector](http://en.wikipedia.org/wiki/.NET_Reflector) (free), not to be confused with [ReSharper](http://en.wikipedia.org/wiki/ReSharper) (expensive). It can show you which DLLs are dependent on another. Then if you want you may be able to remove the DLL that is not being referenced by anything else. Watch out if you are using dependency injection or reflection which then could break your code without your knowledge. 

Reflector:
<http://www.red-gate.com/products/reflector/>.

This add-in draws assembly dependency graphs and IL graphs:
<http://reflectoraddins.codeplex.com/Wiki/View.aspx?title=Graph>.
For C++ resources, did you try right-clicking the project in "Resource View" and then deleting the ones which do not have a tick mark next to them? It is unsafe to delete unused dialog resources since they are referenced as "enum"s in code (like the following).

```
enum { IDD = IDD_ABOUTBOX };

```

..however for all the others it should be safe.