We introduce a multiscale method to compute the effective behavior of a class of stiff and highly oscillatory ODEs. The oscillations may be in resonance with one another and thereby generate some hidden slow dynamics. Our method relies on correctly tracking a set of slow variables whose dynamics is effectively closed, and is sufficient to approximate the effective behavior of the ODEs. This set of variables is found by our numerical methods. We demonstrate our algorithms by a few examples that include a commonly studied problem of Fermi, Pasta, and Ulam (FPU).