"Magic missile is just a teleportation spell to a gun range. Create food and water? Teleportation. Teleport? Believe it or not, a hack of disintegration"
Charles Stross' Laundry series is basically this concept set in the present day: magic is a branch of mathematics, which means it can be computed and programmed.
It is perhaps worth noting at this point the series genre is cosmic horror.
"What the fuck? why is this spell trying to access your Patron directly? Theres no reason it cant run off your local mana reserves"
"Wow I made the pact with the creature from the abyss to get my powers, and now it wants a monthly sacrifice in order to keep use them?"
"How does a simple "create water" spell have a 15 second cast time? Is it doing something else in the background or were the glyphs written by a first year apprentice?"
"Ah fuck how do I change the incantation for my spell again? Let me search the the orb real quick...."
"I copied this spell from an overflowing stack of tomes. I think it was originally meant to cleanse all living things from religious stonework, but I changed some of the constants now it works as disinfectant."
Sir Terry Pratchett's Discworld's wizards are sort of like this, at least once Mustrum Ridcully becomes archchancellor, and especially once they built their magic Rube Goldberg style supercomputer Hex.
+++ Out Of Cheese Error. Please Reinstall Universe And Reboot. +++
"Woah! You can't just cast any spell you find laying around. You have to create a virtual world first, then cast the spell. That way if shit goes pear shaped, you just pull the plug and the world vanishes. Can you imagine if you got a grimoire labeled 'Summon Frog', but it actually summoned a plague of frogs? Do you know even who wrote the book? Bro. Virtual World."
"No, we don't ever touch the old Seance. The wizards of old wrote it a long time ago and the last time we changed a word it stopped summoning demons in jars and started summoning them in rectal cavities. Just leave it alone."
"Gods, I swear you fix one thing in a ritual, two more take it's place - my teleportation no longer puts me in the ground, but now my clothes arrive backwards and occasionally I'm upside down - didn't even touch those bits of the spell!"
See Rich Cook's Wizardry series. It's about software engineers transported to a fantasy world and they start approaching magic as software. They create complex spells out of lots of smaller spells, they even create a debugger demon.
Some smartass drew a penis into the runes for the ritual circle during development by mistake. We tried removing it once we noticed it, but then the whole spell broke so we had to leave it in.
This would help explain why there are so few spells compared to the infinite possibilities of magic. Many problems are solved. There are only so many ways to sort a list and many of them are either entirely unuseful or only good for specific situations. Turns out there's only one way to make a fireball. Every other way doesn't work as good.
"Wait, you're still using store-bought ashes? Haven't you ever made your own? It's super easy, and you don't have to worry if your bone ash is ever cut with Birch anymore."