<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Just a Thought...: Pretty Code</title>
    <link>http://bloritsch.d-haven.net/articles/2007/09/06/pretty-code</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Random thoughts</description>
    <item>
      <title>Pretty Code</title>
      <description>&lt;p&gt;What would happen if you could integrate a word processor and a compiler?  That&amp;#8217;s precisely what &lt;a href="http://web.mit.edu/randy/www/antigrav/geoprogrammer.html"&gt;geoProgrammer&lt;/a&gt;  from Commodore 64 fame did.  The &lt;em&gt;Graphical Environment Operating System&lt;/em&gt; (GEOS) team had several tools available out of the box.  That included &lt;a href="http://www.icpug.org.uk/national/features/010512fe.htm"&gt;geoWrite&lt;/a&gt;  and a few other cool apps.  Because the &lt;span class="caps"&gt;GEOS&lt;/span&gt; team controlled the file formats for all the tools that were part of the system, they could integrate things a bit better than others.  There was no plain text editor in the &lt;span class="caps"&gt;GEOS&lt;/span&gt; system, that wasn&amp;#8217;t sexy.  That wasn&amp;#8217;t graphical.  So why bother with it?&lt;/p&gt;


	&lt;p&gt;You wrote your applications in &lt;em&gt;geoWrite&lt;/em&gt; and compiled them with &lt;em&gt;geoAssembler&lt;/em&gt; which produced relocatable bytecode.  Finally you linked it with &lt;em&gt;geoLinker&lt;/em&gt; .  The whole suite came with a comprehensive &lt;span class="caps"&gt;API&lt;/span&gt; manual which was quite nice considering that &lt;span class="caps"&gt;GEOS&lt;/span&gt; was all assembly language.  The experience taught me that you can have very elegant code even when you are working at the assembly level.  However, an interesting side effect of using &lt;em&gt;geoWrite&lt;/em&gt; to write the code was that you had fonts and font sizes available.  It was actually rewarding to write nice looking comments.  In fact, the comments would be more noticeable than the code.  It was an unexpected side-effect from using a word processor for writing code.&lt;/p&gt;


	&lt;p&gt;Another very nice side effect was that if you wanted to embed graphics for buttons and such, all you had to do was paste your graphic into the document with some marker so that you can reference the graphic in your code.  Can you imagine if your code would make it that easy to reference a graphic instead of having a large byte field encoded in numbers or relying on the linker to get it right?&lt;/p&gt;


	&lt;p&gt;Something like this has never been done since, for a number of reasons.  First, it used to be that graphical operating systems were simply too expensive.  Next, it was that all word processors had their own proprietary formats.  Finally, you have the geek chic of only using text editors because that&amp;#8217;s what geeks do.  You&amp;#8217;d be surprised what a little style can do to make the code more readable.  One example are the text editors and IDEs that color your code for you.  Now that we have an &lt;a href="http://en.wikipedia.org/wiki/OpenDocument"&gt;Open Document&lt;/a&gt;  that most word processors can be extended to use, why not leverage that standard?&lt;/p&gt;


	&lt;p&gt;It turns out that the answer is that it makes the compiler more complicated.  Of course, it&amp;#8217;s easy enough to write a bit of code that simply strips out all the style and feeds the compiler/interpreter the plain version of the code.  Do I expect something like this in the future?  I&amp;#8217;m not sure.  There has to be a cultural demand for it to happen, and right now we are still stuck in the mainframe and resource starved origins.  I think that &lt;span class="caps"&gt;UTF&lt;/span&gt; support in the source code is going to be a sooner cultural demand than &lt;span class="caps"&gt;WYSIWYG&lt;/span&gt; prettifying of code.  The future is still unwritten.&lt;/p&gt;</description>
      <pubDate>Thu, 06 Sep 2007 12:00:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:31909426-61f8-4816-8c68-652ceafc7bb8</guid>
      <author>Berin Loritsch</author>
      <link>http://bloritsch.d-haven.net/articles/2007/09/06/pretty-code</link>
      <category>beauty</category>
      <category>code</category>
      <category>history</category>
      <category>future</category>
    </item>
  </channel>
</rss>
