Forgive me for asking a rather general question, but how do you psychologically deal with high levels of complexity in software projects?
I'm working on a personal compiler project and am currently trying to understand the unmanaged .net metadata API (and before anybody mentions it, Reflection.Emit is not sufficient for my needs!) which are horribly opaque and have very little documentation. Half the time the documentation consists of PaintFooRed() - 'this function paints Foo red.' so I'm really scrabbling around in the dark trying to work things out through trial, error and working things out from first principals.
When dealing with enormous complexity like this I find the uncertainty of a. how long something may take, b. whether it's even possible and c. whether the approach I'm taking is correct is very difficult to deal with.
How do you deal with this kind of situation?
I've found that solving problems of this degree of uncertainty and complexity are a considerably greater joy than finding the solution to more trivial tasks - has anybody else experienced this too?