Charles Babbage was the inventor of Analytical Engine and Difference Engine.
Ada Lovelace was a mathematician and computer programmer.
The Guardian says :
Often described as the world's first computer programmer, Lovelace showed a keen interest in mathematical studies from an early age [...]
Wikipedia reports some controversy over the claims :
Though Lovelace is referred to as the first computer programmer, some biographers and historians of computing claim the contrary.
It quotes Allan G. Bromley (emphasis added to highlight the notable claim) :
All but one of the programs cited in her notes had been prepared by Babbage from three to seven years earlier.
It goes on to quote Eugene Eric Kim and Betty Alexandra Toole (emphasis added) :
Many people, for instance, incorrectly claim that Ada was the first computer programmer. (Babbage, not Ada, wrote the first programs for his Analytical Engine, although most were never published.)
Did Babbage write programs for the Analytical Engine prior to Lovelace?