The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Programs still edited as text redux

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mark Levison

Posts: 877
Nickname: mlevison
Registered: Jan, 2003

Mark Levison an agile software developer who writes Notes from a tool user.
Programs still edited as text redux Posted: Jan 19, 2005 11:13 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Mark Levison.
Original Post: Programs still edited as text redux
Feed Title: Mark Levison
Feed URL: /WebLog/error.aspx?aspxerrorpath=/WebLog/mlevison/Rss.aspx
Feed Description: Musings on No Touch Deployment, .NET development and photography
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Mark Levison
Latest Posts From Mark Levison

Advertisement
Apparently I'm not the only who has been thinking about how we edit programs.  Jon Udell has written a column "Exploring the deep structure of code" and a blog entry "The deep structure of code". He mentions an interesting paper that I'd missed: "Example Centric Programming" (PDF) by Jonathon Edwards .  I think that Jonathon's "Manifesto of the Programmer Liberation Front" nicely summarizes much of what I was thinking about.  In particlular these paragraphs really resonate with me:
Text is a dead-end

Programming is stuck in an evolutionary dead-end: the use of character strings to encode programs. Every other computer-mediated form of expression has evolved beyond text into sophisticated WYSIWYG interfaces to complex data structures. For example, no one still uses textual markup for word processing (except, notably, Computer Scientists with TeX). We need WYSIWYG programming.

It's called 'code' for a reason

Programming languages are built upon two basic tricks: the use of grammars to encode tree structures (AST's) into text, and the use of names to encode linkages across these trees. Much of what makes a language unique is its particular style of name resolution, as in the polymorphism and inheritance techniques of OO languages. Text is a dead end because all these sophisticated techniques in one way or another are just encoding structure in text strings. This is disastrous for usability.

Structure needs to be made explicit and directly manipulable, not implicit and encoded. Mentally parsing and interpreting this implicit structure is an enormous cognitive burden for the programmer. Modern IDE's such as Eclipse go to great lengths to extract the encoded structure back out of the text and help us to visualize and manipulate it somewhat more directly. Refactorings are provided by the IDE to automate the complex and widespread changes in syntax necessary to effect simple semantic changes. This is absurd. We should manipulate semantic structures directly through a WYSIWYG interface. The language is the IDE.

Much of what we know about programming language design is about clever ways to encode structure in text, and fancy ontologies to rationalize naming. Discarding the textual representation suddenly makes all this irrelevant, and opens a whole new space of design choices. Some who are invested in the status quo will see this as a threat and become counter-revolutionaries.

When I wrote Programs still edited as text? Why?, I was struck by the absurity of tools like QuickCode .NET.  This is macro tool - I type in 'prop int test', do an Alt+Q and it generates a property for me. Pure text replacement.  It works well and is certainly faster than typing properties by hand, but simple text replacement strikes me as insane.  We could do this in emacs.  When inserting a new method why do we need to type all the kewords 'protected static void' - a better IDE would just prompt me for scope (public, protected, ...), modifiers (abstract, static, ...) and return type. I could continue this list for sometime to come - I think our modern IDEs are hampering our productivity.

What needs to be done? In the short term:

  1. IDE's need to better tools to manipluate their Abstract Syntax Trees
  2. The Abstract Syntax Trees need to be documented and made accessible to external vendors

BTW "QuickCode .Net" is perfectly good tool, I'm mention it only because I'm familiar with it.

Finally, Jon I hope that the tool vendors give you good reason to give up Emacs long before you retire (let alone go to the grave).


This Blog Hosted On: http://www.DotNetJunkies.com/

Read: Programs still edited as text redux

Topic: True Lies - the GNN Book Previous Topic   Next Topic Topic: Another new C# PM blogger

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use