One-Way Trip

Published by:

When we are faced with a decision that is going to have long-term consequences, it would be easier if we could predict which outcome is going to make us the happiest. Sometimes we pray about the decision as we try to discover the best answer. A good goal is to feel strongly enough about the decision that those feelings will sustain us later, as we live out the consequences of the decision.

Prayers occasionally add to the stress though, because we worry that a bad decision will indicate that we were spirituality misguided. It’s as if we want to travel forward in time and have a conversation with ourselves. We would like to ask someone who has all the facts about which decision is better. And we want prayer to help us attain that level of certainty.

Prayer works better if we use it in the other direction. Instead of asking our future self which decision is better, we should tell our future self which decision we want. First we need to understand what it is we feel is right. Then we need to commit to that course of action. After that, it doesn’t make sense to worry that the future might prove us wrong. Our actions and our attitude will control how satisfied we are. We can have peace of mind just by knowing that we will persevere until our future works out.

DIY-DI

Published by:

The “dependency injection” (DI) technique is a way to improve testability and maintainability of object-oriented code. Typically adoption of dependency injection is coupled with adoption of a dependency injection framework, such as Guice or Spring. These materials show how dependency injection can be accomplished without any framework. The same benefits provided by frameworks can be realized using “do-it-yourself” (DIY) handcrafted code. This model is named DIY-DI, pronounced die-die.

Update (May 29, 2010): I added a comparison with Guice and more polished code snippets to the DIY-DI manual.