X
Business

Intentional programming and Dreaming in Code

Worth reading: I have been following Charles Simonyi's adventures in programming for many years. Charles is considered the father of Microsoft Word and the architect of Microsoft Office.
Written by Dan Farber, Inactive
Worth reading: I have been following Charles Simonyi's adventures in programming for many
simonyi01.jpg
years. Charles is considered the father of Microsoft Word and the architect of Microsoft Office. He left Microsoft in 2002, after more than 20 years on the Redmond campus, to form Intentional Software, with the intention of taking the drudgery out of software programming. In the MIT Technology Review, Scott Rosenberg has written an extensive profile of Charles, who is scheduled to take a 10-day trip to the International Space Station in April, and of the intentional programming concept.
dreamcode.jpg
Scott has also been busy lately preparing for a launch. Although he isn't heading for outer space, his book, ""=""> will be released on Tuesday. He uses the Open Source Applications Foundation's Chandler and Cosmo projects as a backdrop for exploring the lore and enigmas of software development and the human-computer interface. In the book, which is a thoroughly engrossing and instructive exploration into the heart and culture of software development, Scott writes:

"It's tempting to view the multitude of monster projects gone bad as anomalies, excrescences of corporate and government bureaucracies run amok. But you will find similar tales of woe emerging from software projects big and small, public and private, old and new. Though the details differ, the pattern is depressingly repetitive. Moving targets. Fluctuating goals. Unrealistic schedules. Missed deadlines. Ballooning costs. Despair. Chaos."

Software development is a fundamentally human endeavor, a Sisyphean task in which the hill seems to get steeper. After spending years conceiving and writing "Dreaming in Code," Scott distilled his experience into what he self-referentially calls Rosenberg's Law:

"Software is easy to make except when you want to make something new. And then, of course, there is the corollary. The only software that's worth making is software that does something new."

Intentional programming is something new aimed at taking complexity and errors out of the software development process. As part of Scott's intentional programming article in the Technology Review, Wade Roush provides an explanation of intentional programming, which so far has been more theory than practical reality. Here is the gist of it:

With the programmers' help, the domain experts list all the concepts and definitions the software will need to encompass. All these definitions go into a database that Simonyi calls the "domain schema."

Like the bench maker turning his knobs, the programmers then incorporate the definitions in the domain schema into "domain code"--a high-level representation of the software's functions, expressed in a "domain-specific language," or DSL, that can be tailored to suit the industry in question. But while DSLs can vary, each action the software must carry out is stored in a uniform format, an "intentional tree." Intentional trees have the advantage of being visually simple but logically comprehensive, which means they can be manipulated, revised, and "projected" or reënvisioned at will.

For example, the computation represented by the simple program statement
return a = b / (c +1) ;
is represented by the following intentional tree:
Return
(
Assign
(
a,
Div
(
b,
Plus
(
c,
1
)
)
)
)
Once encoded in tree form, the computation can be projected in many other ways that might be more familiar to domain experts, such as
b
return a = ------- ;
c+1
Does intentional programming make more sense to you now? 
Editorial standards