News for North Texas
Play Live Radio
Next Up:
0:00
0:00
0:00 0:00
Available On Air Stations

Think: The Beauty of Computer Code

Shutterstock

Vikram Chandra is a writer with two very distinct audiences. Sometimes his reader is a bookworm awaiting his next novel. And sometimes the reader is a computer ready to process his next line of code. Today on Think, Chandra talked to Krys Boyd about how both literature and computer code can be beautifully written.

Chandra says that the difference in writing for people and for computers is how the words function.

“In very good poetry, the surface – what it says in its denotative sense – is not the only meaning," he says. "There’s lots of other implications. As the famous writing program dictum has it, show, don’t tell. In a way, you’re telling by not telling – by silence about what you’re actually talking about.”

Computers, on the other hand, don’t really appreciate nuance.

“Code has to be very explicit. … In other words, if the meaning of what you’re writing in code ever becomes ambiguous, you’re going to crash somebody’s computer, or you’re maybe going to lose their banking data.”

Well-written computer code, he says, derives its beauty from its functionality.

“When you write code, you’re not really writing it for the machine," he says. "Because three months from now, somebody else is going to have to open that file and read your code and understand it. So there’s a premium on clarity, on expressiveness and on building your architecture in such a way that people 20 years from now can look at it and understand how it actually works.”

Vikram Chandra’s new nonfiction book is called Geek Sublime: The Beauty of Code, the Code of Beauty. Think re-airs tonight at 10, or listen to the podcast.

Stephen Becker is executive producer of the "Think with Krys Boyd," which airs on more than 200 stations across the country. Prior to joining the Think team in 2013, as part of the Art&Seek team, Stephen produced radio and digital stories and hosted "The Big Screen" — a weekly radio segment about North Texas film — with Chris Vognar.