Science and Spirituality are two complementary distinctions. What we understand walking on the path of Spirituality, eventually Science endorses it with its theory and experiments. There can never be a competition between these two as Spirituality itself is a Science and Science itself is Spiritual, and Scientist is no lessor to Yogis.
It takes the same amount of focus to achieve the breakthroughs in Science and equally it is for Spirituality. Both are methodical, and at peak achievement, one feels the bliss.
When talking in the terms of Programming language, Spirituality has Self (ego) and Spirit (supreme power) and programming has Local and Global variables. Whatever examples one may take, the same would be found in these examples.
When in doubt while doing something that is scientific, look to spirituality for an answer and vice-versa.