The 20th century has revealed two important limitations of scientific knowledge. On the one hand, the combination of Poincares nonlinear dynamics and Heisenbergs uncertainty principle leads to a world picture where physical reality is, in many respects, intrinsically undetermined. On the other hand, Godels incompleteness theorems reveal us the existence of mathematical truths that cannot be demonstrated. More recently, Chaitin has proved that, from the incompleteness theorems, it follows that the random character of a given mathematical sequence cannot be proved in general (it is undecidable). I reflect here on the consequences derived from the indeterminacy of the future and the undecidability of randomness, concluding that the question of the presence or absence of finality in nature is fundamentally outside the scope of the scientific method.