From PhilPapers forum Natural Sciences:

2017-02-01
Huygens' Light Theory: A Text Analysis
Fermat's Illusion: the Rule of Least Possible Time
This rule has made a great impression not only on illustrious thinkers of the 17th century, but also on renown scientists up to modern times, as Richard Feynman can testify. Allow me to use Huygens version which is, as he himself says "simpler and easier." (p.57/43).
The rule is very simple, We have a starting point A in a fast medium like air, a boundary point B, and a refracted arrival at C in a slower medium like water. The rule says that the trajectory light takes from A to C, passing through B, is the fastest light could follow, taking the speed of light in each medium into consideration. It is therefore not only a matter of distance, because in this case, a straight line from A to C would be the shortest. But then, that would mean, as Feynman would say, running very fast for a short time, and swimming very slowly for a much longer time.
All other combinations turn out to take more time than the refraction trajectory of light. Isn't that something magical? It looks like light knows which path to follow to get there as fast as possible! Just like it knows not to go through two slits at the same time when somebody is watching!
This mysticism is present in all of physics. Scientists somehow seem to nurture the conviction that Nature is something beyond human comprehension. It has been said that they are all atheists in week days, and believers in the weekend. I believe that most of them never stop believing, which makes them very sensitive to theories that go beyond the boring mechanical Newtonian view. Such a view was considered revolutionary as long as ignorant priests tried to control the scientific minds, but now that this menace has been eliminated, our scientists suddenly feel the need of something transcending their smothering labs. Is that all there is to science? Tedious experiments and calculations?
I am afraid so.
Let us now look at Fermat's special brand of mysticism. Could light really somehow know which path is the fastest in all situations?
Well, of course! The fastest trajectory is always the one the light takes. The question is, could it take another route to its objective? And what does it really mean that it always takes the fastest path?
Take three points A, B and C. There is a simple rule: you have to get to C by passing through B. For the rest, you are free to go any way you want.
I will bet you one whole kilogram of chocolate (make it 10 K's, I never seem to have enough of it in house) that wherever you place B, the shortest path will always be AB + BC.
There is one condition though: C should be placed relative to B the way a ray coming from A would be refracted to C.
What you are not allowed to do is what Feynman does so nonchalantly: change the rules to fit your own conclusions.
You cannot decide that you have only A, a life-guard on the beach, and C, someone drowning in the water, and then ask A to choose the fastest path to C.
That would mean that light is free to choose where it will shine and refract, and that is simply not true. Any point B you choose has a specific refracting destination depending on the position of A. All other points will have their specific A and C positions, and each combination A, B, C will be the fastest simply because it is the only possible one.
You could then say that Fermat is right, that light always chooses the fastest path, but you would be terribly wrong. Light does not choose, because it has never more than one possibility.
But that possibility is always the fastest, right? 
Wherever you put C, the straight line BC will be the shortest path. And whatever point B you point the light at, AB will the shortest path. But not every BC will correspond to the trajectory of a refracted ray coming from a specific A. Move A and you will move C at the same time. 
The fallacy in Fermat's (and Feynman's) approach is to attribute free choice to the life-guard, and therefore to light, while it is in fact like pointing the life-guard, who has to keep his eyes closed, in a certain direction, and tell him to keep running until he reaches the water, and once in the water, to let himself get carried away by the stream. Would you then still say that the life-guard always chooses the fastest path?
Feynman needs the imprecision inherent to the concept of point source of light. It sounds like one and the same ray of light (or even wave if you prefer) can take different directions randomly. This is a petitio principii. It is like shooting a gun fastened on a tripod and being surprised that the bullet does not hit at the same spot each time. It is funny how the Uncertainty Principle only gets to be used when it is convenient. How can one assume that the position of the gun, and therefore the trajectory of each bullet (it is never the same one and they are never absolutely identical at the subatomic level), does not change from one shot to the other?
If you absolutely need to leave the choice to light, then start at the beginning: why does light always have to travel in straight lines? Could it choose not to?
The trouble with Fermat's Rule of Least Time is that it claims to be an explanation for the behavior of physical processes, while it is at most an epiphenomenon. It gives the false impression that we understand why light behaves as it does, and why the Law of Sines is as it is, while in fact we are simply stating the existence of empirical regularities.
Yes, however light gets refracted, its path will always be the fastest of all other possible trajectories... if the world were not as it is, and if light could behave differently.
Fermat was really wrong for believing he had discovered a law of nature that explained the behavior of light, and Huygens, Feynman and others were misguided when they took him at his word. I know these are harsh words, not generally used in academic essays, but there is no excuse for you when you are so smart. Scientists have had more than 300 years to ponder this fallacy, but apparently all it did is give credibility to the likes of Bohr.