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.
Oh that series is so much fun! I need to read those books again. Another good one is Scott Meyer's Magic 2.0 series. Basically a random dude finds the rules.ini file for the universe hiding out on the internet and ends up using it to travel back back to Arthurian England to live openly as a Wizard. Except he's not the first one with that idea...