Text this: Principles of dynamic optimization in resource management