Some APIs change because the world evolves, some because they are fundamentally broken from the start; looking at you Thread.stop
!
What makes API design hard is that it must endure time. As soon as the contract is out there, you can't just take it back without a world of pain. Stadia is a perfectly good example of lost trust.
What's with a recipe?
Both Coca-Cola and Pepsi have iterated their formulas over the years. It's a known fact that one of the major ingredients in Coke is now missing; coca-leave (cocaine) and cola-nut (caffeine) gave Coca-Cola its name.
The 70s saw the commodities boom and, with it, the last formula change.
In the aftermath of the six-days war, Egypt closed the Suez Canal, which stirred the oil crises. There was also a massive spike in Coffee price given that Brazil lost 2/3rds of its coffee plants and both Angola and Guatemala saw a civil war and a major earthquake.
Amidst the instability, the largest sugar producer at the time, the Soviet Union, started hoarding the carbohydrate to fend off further uncertainty.
That was the last change Pepsi and Coca-Cola made: high-fructose corn syrup. Until now.
What's up with Pepsi API, then?
Given that for the last 50 years there was an implicit contract, it came as a surprise to learn that PepsiCo was sneakily messing with the original drink's recipe.
The idea is pretty smart, but for it to work, Pepsi can't make any fuss around it. The splashy campaigns of the past gave way to a covertness operation.
During the pandemic, Pepsi Original, the blue can, saw a remake. On the outside, everything stayed surreptitious the same. On the inside, though, a tiny bit of sugar was replaced by AcesulfameK.
The idea is to keep replacing sugar by AcesulfameK in tiny amounts and, eventually, Pepsi Original will be sugar-free. Or not. Depends on market reaction.
On the few occasions PepsiCo talked about the change, it did so under the ruse of promoting a healthier lifestyle and without conceding a timeline. My best guess is that they'll be monitoring sales to see how far can they go.
But let's be honest, the end goal is profit and sugar-tax, which is not yet a thing in the US, eats a lot of profit in Europe.
In 2017 Pepsi sold 127 million litres of Pepsi original in the UK alone. In sugar-tax only, this amounts to over 10 million pounds. Coca-cola will pay more than 22 million of sugar tax just in the UK!
Sugar is bad, so this should be good, right?
Let's get back to the API. When you implement a public contract, your consumers, fittingly, have a certain degree of expectation. You will most definitely have an EULA that gives you free reigns over the system, but having people use your product is the end goal. As such, backward incompatible change will be frowned upon and, if it must be so, has to be explicit and perfectly documented.
Pepsi's strategy to bypass the sugar-tax is precisely the opposite.
You may argue that the majority of users will not notice and, if you're being pedantic, that it wasn't an API change, just a data change. While most people will definitely not notice, there's a minority whose systems will break.
People who are allergic to AcesulfameK and Aspartame!
Embrace change, but engage users!
A good API is designed taking into consideration the consumer's needs. It should be explicit and allow for seamless integration. It should be complete. Concise and hard to misuse.
Be a good API designer.
Don't be like Pepsi.
Out of spite, get yourself some Coca-Cola.
Edit: There's a Reddit thread where users say that in the US, Pepsi is still using the original formula. On top of that, in Peru (a sugar-tax country), Coca-Cola is following Pepsi's lead by feeling the markets' reaction to changing the formula without warning users.
As an Amazon Associate I may earn from qualifying purchases on some links.
If you found this page helpful, please share.