<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Elf Sternberg</title>
	<atom:link href="http://www.elfsternberg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.elfsternberg.com</link>
	<description>Geeky.  Arrogant.  Slack.</description>
	<pubDate>Sat, 01 Nov 2008 21:05:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Using UML to do Web Application Design</title>
		<link>http://www.elfsternberg.com/2008/11/01/using-uml-to-do-web-application-design/</link>
		<comments>http://www.elfsternberg.com/2008/11/01/using-uml-to-do-web-application-design/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 21:05:30 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=62</guid>
		<description><![CDATA[   Consilience UML Chart 
 In case anyone&#8217;s curious, this is the UML chart with WAE I churned out for my To-Do manager.  The model is pretty simple: Users have Lists, Lists (called &#8220;Documents&#8221;) have Tasks, Tasks have DoneDates.  Task properties include a minimal number of days that a task can [...]]]></description>
			<content:encoded><![CDATA[<div style="margin: 6px; color: darkblue; font-size: small; float: left;"> <a href="http://flickr.com/photos/elfsternberg/2990522817/"> <img src="http://farm4.static.flickr.com/3034/2990522817_f55d322162_m.jpg" border="0"></a><br /> <span style="font-size: x-small;">Consilience UML Chart</span> </div>
<p> In case anyone&#8217;s curious, this is the UML chart with WAE I churned out for my To-Do manager.  The model is pretty simple: Users have Lists, Lists (called &#8220;Documents&#8221;) have Tasks, Tasks have DoneDates.  Task properties include a minimal number of days that a task can be allowed to slide, and a maximal amount.  An algorithm, initially in python but I intend to migrate it to javascript and do the math on the client to reduce server load, figures out how to decorate the task list based upon the task profile and a collection of done dates &#8220;around today.&#8221;</p>
<p>This chart is very shorthand-y: in many cases it&#8217;s a matter of my knowing what I meant.  The boxes with circles in the upper right hand corner are controllers; the ones with squares are views.  There&#8217;s some confusion on the chart as to whether or not there are controllers that are view generators; the one labeled &#8220;doc builder&#8221; appears to be, but there&#8217;s no corresponding view generating controller, I don&#8217;t think, for Lists of Lists.  There are also weaknesses in WAE that I&#8217;ve never gotten around to addressing, which is that it was first cooked up in 2003 and has almost no sense of ajax or component-driven view management, and has a whole bunch of notation for frames that can&#8217;t really be ported over to ajax.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/11/01/using-uml-to-do-web-application-design/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Django: The Book Is Wrong, the Tutorial is Right</title>
		<link>http://www.elfsternberg.com/2008/10/22/django-the-book-is-wrong-the-tutorial-is-right/</link>
		<comments>http://www.elfsternberg.com/2008/10/22/django-the-book-is-wrong-the-tutorial-is-right/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 19:25:25 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[python]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[django]]></category>

		<category><![CDATA[peeve]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=55</guid>
		<description><![CDATA[A couple of weeks ago I bought the book &#8220;The Definitive Guide to Django,&#8221; and I&#8217;ve come to realize, to my frustration, that the book is already outdated.  My big headache this week was dealing with the administration interface, which the Django people swear is one of the coolest features of the entire application server.  [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I bought the book &#8220;The Definitive Guide to Django,&#8221; and I&#8217;ve come to realize, to my frustration, that the book is already outdated.  My big headache this week was dealing with the administration interface, which the Django people swear is one of the coolest features of the entire application server.  The problem is simple: between Django 0.96, which is when the book was written, and Django 1.0, which is what I&#8217;m running, the interface was <em>completely changed.</em></p>
<p>In 0.96, the way you defined a database table as being &#8220;administratable&#8221; was to add to the Python definition of the table a subclass entry <tt>class Admin: pass</tt>.  The Administration app would automagically pick out those tables that were administratable and they would appear in the admin interface.</p>
<p>In 1.0, it&#8217;s completely different.  Instead, you must create in your application, next to your models, a file <strong>admin.py</strong> which contains registry lines for each model and, optionally, an administration interface class that describes how the model should be administered.  It&#8217;s all covered <a href="http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02">in the Django tutorial</a> which doesn&#8217;t really help you if all you have is <a href="http://www.djangobook.com/">the book</a>.</p>
<p>This makes obvious sense.  Administrative details are independent of model details, and although the argument <em>could</em> be made (and was made) that they&#8217;re implementation details of the model, making it a separate decorating class also makes just as much sense.  Yes, it means that the details of a class (the administrative class of a model) are in two different places, but it also means that administrative features of your application can be restricted in deployment just by deleting the <strong>admin.py</strong> file.</p>
<p>You did keep a copy of <strong>admin.py</strong> in your source control, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/10/22/django-the-book-is-wrong-the-tutorial-is-right/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Javascript Framework Phrasebook</title>
		<link>http://www.elfsternberg.com/2008/09/25/the-javascript-framework-phrasebook/</link>
		<comments>http://www.elfsternberg.com/2008/09/25/the-javascript-framework-phrasebook/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 22:49:29 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[javascript]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[dojo]]></category>

		<category><![CDATA[extjs]]></category>

		<category><![CDATA[frameworks]]></category>

		<category><![CDATA[scriptaculous]]></category>

		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=50</guid>
		<description><![CDATA[I work with EXT and Prototype at the office, and Dojo at home.  I have a lot more time with EXT than either of the other two, so when I&#8217;m working on a personal project my first thought is &#8220;If this were EXT, I&#8217;d do it this way, but how do I do it [...]]]></description>
			<content:encoded><![CDATA[<p>I work with EXT and Prototype at the office, and Dojo at home.  I have a lot more time with EXT than either of the other two, so when I&#8217;m working on a personal project my first thought is &#8220;If this were EXT, I&#8217;d do it <em>this</em> way, but how do I do it in Dojo?&#8221;</p>
<p>It&#8217;s useful to write that knowledge down.</p>
<p>Last night, I ginned up a quick wiki, dropped in a theme I liked, and put the whole thing up.  It only has a few entries right now but they should be enough to show what I&#8217;m trying to accomplish.  If you find this a useful idea, please contribute to it and publicize it:</p>
<h3><a href="http://www.elfsternberg.com/jfp">The Javascript Framework Phrasebook</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/09/25/the-javascript-framework-phrasebook/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C __LINE__ equivalent in Python</title>
		<link>http://www.elfsternberg.com/2008/09/23/c-__line__-equivalent-in-python/</link>
		<comments>http://www.elfsternberg.com/2008/09/23/c-__line__-equivalent-in-python/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 21:29:34 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=45</guid>
		<description><![CDATA[I started using this recently.  If you do a lot of Python, you&#8217;ll sometimes find yourself desperate for breadcrumbs, little print statements scattered throughout your code as you try to figure what you told it to do, since it&#8217;s obviously not doing what you want it to do.  I&#8217;d used inspect previously to [...]]]></description>
			<content:encoded><![CDATA[<p>I started using this recently.  If you do a lot of Python, you&#8217;ll sometimes find yourself desperate for breadcrumbs, little print statements scattered throughout your code as you try to figure what you told it to do, since it&#8217;s obviously not doing what you <em>want</em> it to do.  I&#8217;d used <tt>inspect</tt> previously to unravel exception handlers; there&#8217;s a customized one inside the Isilon UI, so if the product fails in the field the exception will be logged to a file for later analysis, but this is a nice little routine.  It&#8217;s basically a pythonic version of the C  <tt>__LINE__</tt> macro.  Wherever you think you might need a debugging statement, put <tt>if DEBUG: print _line(), foo, bar, baz</tt> and you&#8217;ll not only get the fields you want to see, but also the name of the function/method, and the line number of the print statement.</p>
<pre>import inspect
def _line():
    info = inspect.getframeinfo(inspect.currentframe().f_back)[0:3]
    return '[%s:%d]' % (info[2], info[1])</pre>
<p>Use as needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/09/23/c-__line__-equivalent-in-python/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I write code the way I write prose.</title>
		<link>http://www.elfsternberg.com/2008/09/05/i-write-code-the-way-i-write-prose/</link>
		<comments>http://www.elfsternberg.com/2008/09/05/i-write-code-the-way-i-write-prose/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 18:44:10 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[javascript]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[firewatir]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[watir]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=40</guid>
		<description><![CDATA[For the past eight days or so, I&#8217;ve been having the absolute pleasure of working on a pure research project, re-implementing FireWatir in Python.  The project is known internally as &#8220;Whiskey,&#8221; (FireWatir without the R) and at some 1805 lines is faster and more concise than firewatir&#8217;s 6522 lines.
The real trick was to stop [...]]]></description>
			<content:encoded><![CDATA[<p>For the past eight days or so, I&#8217;ve been having the absolute pleasure of working on a pure research project, re-implementing <a href="http://wiki.openqa.org/display/WTR/FireWatir">FireWatir</a> in Python.  The project is known internally as &#8220;Whiskey,&#8221; (FireWatir without the R) and at some 1805 lines is faster and more concise than firewatir&#8217;s 6522 lines.</p>
<p>The real trick was to stop sending huge masses of javascript back and forth with every operation, but instead to encapsulate all of the javascript FireWatir generates and transmits per transaction into a javascript library, upload that once, and then just issue one-line calls to the JSVM through the library.  This skips a very expensive interpretation step and allows context identity to be maintained more explicitly.</p>
<p>Also, on the client (python) side, finding objects became a matter of doing things like:</p>
<pre>doc.input(name="username").set("user")
doc.input(name="password").set("mypassword")
doc.input(typ="submit",value="Submit").click()</pre>
<p>You&#8217;ll note that I&#8217;ve seriously overloaded the dot operator (<strong>.</strong>); in some contexts, it means &#8220;get child object of&#8221;, and in other it means &#8220;get attribute of&#8221;, and in yet a third it means &#8220;dereference function attribute of and call function.&#8221;  Yet as you can see from the example, that&#8217;s not tragically confusing.  (And yes, &#8220;type&#8221; is misspelled &#8220;typ&#8221;, to avoid conflicting with the python keyword <tt>type</tt>.)</p>
<p>Oh, a fun inner implementation issue: <tt>doc.input(name=&#8221;username&#8221;).style.background.set(&#8221;#ffffff&#8221;)</tt>.  Here, &#8220;Style&#8221; has to dereference not to a function, but to value that&#8217;s not scalable&#8211; it&#8217;s a reference to a DOM Style object, so I needed an inner class to be instantiated, that knew what object was being manipulated, in order to manipulate it.</p>
<p>And finally, there are alternatives: <tt>doc['input[name=username]&#8216;].set(&#8221;user&#8221;)</tt> will do the same as the first line of the first example.  And <tt>doc[4]</tt> will return a handle to the fourth child element (not node!) of the root document object.  This can be really useful when doing things like: <tt>doc.table(&#8221;#accounting&#8221;)[4][4]</tt>, although to be honest that has a special case handler to skip table headers and go straight for the body.</p>
<p>But what I learned while writing this is that I really do code very much like I write.  I wrote a ton of crap, and then when I started to get serious about what I was trying to accomplish, when I started documenting my code, huge amounts of code simply got thrown away.  The most common through was &#8220;I never did need that.&#8221;  &#8220;I never used that.&#8221;  &#8220;I haven&#8217;t implemented that well, let&#8217;s take it out and see if we need it later.&#8221;</p>
<p>I also seem to thrive in an <a href="http://www.extremeprogramming.org/">Extreme Programming</a> environment.  I&#8217;ve known for a long time that I do that well, and this was no exception; the best development periods were when I had my UI partner looking over my shoulder and the two of us leapfrogged each other&#8217;s thinking patterns to home in on exactly what was needed.</p>
<p>For example, the <tt>doc[4]</tt> started life as a specialized override of <tt>__getitem__()</tt>, with just a numeric handler for Table and TR objects.  He suggseted I push it up into the base Element handler and use it everywhere, and make the Table handler a special case if the Table had a Tbody (oh, and push <em>that</em> logic into the Javascript library to avoid round-tripping the conditional), and I immediately saw the utility of putting a type conditional in <tt>__getitem__</tt> so that if you passed it a string you could treat it like a CSS selector.</p>
<p>Anyway, I&#8217;ve been having more fun than a programmer should be allowed to have.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/09/05/i-write-code-the-way-i-write-prose/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Anything you can do, I can do better / I can do anything better than you&#8230;</title>
		<link>http://www.elfsternberg.com/2008/08/26/anything-you-can-do-i-can-do-better-i-can-do-anything-better-than-you/</link>
		<comments>http://www.elfsternberg.com/2008/08/26/anything-you-can-do-i-can-do-better-i-can-do-anything-better-than-you/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 16:16:57 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=37</guid>
		<description><![CDATA[Until circumstances change, this will just be the most horrible geek tease you can imagine.
At the office, we have exactly three approved programming languanges: C for performance, Python for everything else, and a begrudging tolerance for ECMA-262 for the WebUI team and site design.  (Although the docs deployment people get away with PHP, which [...]]]></description>
			<content:encoded><![CDATA[<p>Until circumstances change, this will just be the most horrible geek tease you can imagine.</p>
<p>At the office, we have exactly three approved programming languanges: C for performance, Python for everything else, and a begrudging tolerance for ECMA-262 for the WebUI team and site design.  (Although the docs deployment people get away with PHP, which annoys me to absolutely no end.)</p>
<p>The problem has been that unit testing the WebUI has been more or less impossible in a systematic way in a language that QA has been required to learn.  The most useful of all WebUI unit testing frameworks is <a href="http://wiki.openqa.org/display/WTR/FireWatir">FireWatir</a>, Firefox Web Application Testing In Ruby.  It&#8217;s a nifty framework; it talks to a Firefox (or Mozilla) instance over a telnet socket opened up in firefox&#8217;s backside (oh, baby, talk dirty to me!).</p>
<p>But it&#8217;s written in Ruby, dammit.  I don&#8217;t want to have to teach my QA team <em>another</em> programming language.</p>
<p>Therefore, the solution was completely obvious: rewrite FireWatir in Python.</p>
<p>I&#8217;m not saying I&#8217;ve done this.  I won&#8217;t even talk about what <strong>I</strong> have done.  But for programmers fluent in Python, Ruby, and Javascript, who are comfortable with network programming and can successfully build Mozilla by hand, it won&#8217;t take more than 24 straight hours (not &#8220;a day,&#8221; mind you but a 24-hour work cycle) to port the entire project to Python.</p>
<p>If someone <em>did</em> such a thing, though, what would they call it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/08/26/anything-you-can-do-i-can-do-better-i-can-do-anything-better-than-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>John McCain&#8217;s website, a professional observation</title>
		<link>http://www.elfsternberg.com/2008/08/16/john-mccains-website-a-professional-observation/</link>
		<comments>http://www.elfsternberg.com/2008/08/16/john-mccains-website-a-professional-observation/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 20:24:55 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=35</guid>
		<description><![CDATA[A few weeks ago, much was made of John McCain&#8217;s astroturf campaign, the one in which he and his website provide boilerplate comments for his supporters to post to other forums and websites.  That was annoying enough, but when I checked it out I saw something else that, from a professional standapoint, annoyed me [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, much was made of John McCain&#8217;s <a href="http://www.washingtonpost.com/wp-dyn/content/article/2008/08/06/AR2008080603589.html?hpid=topnews">astroturf campaign</a>, the one in which he and his website provide boilerplate comments for his supporters to post to other forums and websites.  That was annoying enough, but when I checked it out I saw something else that, from a professional standapoint, annoyed me just as much.</p>
<p>The list of sites to turf is in the right-hand sidebar of the page, and it&#8217;s a simple drop-down box (a &lt;select&gt; box).  Below it is a list of sites that correspond to one of the four categories, &#8220;liberal,&#8221; &#8220;conservative,&#8221; &#8220;moderate,&#8221; or &#8220;other.&#8221;  When you change the category, the javascript engine goes and fetches a new list for you.  <em>Every single time</em>.</p>
<p>The initial download of that page is 610KB, and Firefox considers 503KB of that uncacheable!  McCain&#8217;s web developers aren&#8217;t saving anything by widgetizing another 20KB or so of data, they costing themselves bandwidth and, to the professionals in the audience, they look really stupid.</p>
<p>Rich Internet Application developers like myself make decisions about this kind of material all the time.  Repeated downloads of small static blocks waste the viewer&#8217;s time, chew up bandwidth, and contribute nothing to comprehension.  It&#8217;s just bad programming.</p>
<p>For lists like this, the correct solution would have been a single &lt;div&gt; container with three inner &lt;div&gt;s, one for each list, each tagged with an <tt>id</tt> for the specific category, a <tt>class</tt> for the javascript to hook into, and a <tt>style</tt> of <tt>display:none</tt>.  Inside each &lt;div&gt; you&#8217;d put a &lt;UL&gt; or &lt;DL&gt; (the latter if you want some additional information, &lt;DD&gt;-type, with each entry, which the McCain people do), and then with an <tt>onReady</tt> handler hook up the javascript you&#8217;re going to use anyway to swap the three divs in and out as needed, with additional javascript to handle showing the &lt;DT&gt; information when whatever event you want to associate with it happens.</p>
<p>Viola&#8217;.  Two chunks of javascript <em>much</em> smaller, faster, smarter and easier than any ajax call, a little responsible HTML, and some straightforward CSS and that sidebar is perfomant, accurate, and and attractive.</p>
<p>As an extra, if you have <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">firebug</a> installed, go download one of those lists and then run &#8220;Inpect Element&#8221; on it.  That&#8217;s the most bloated, overwrought, overstyled, ridiculous post-hoc generated HTML I&#8217;ve seen in a long time.  It looks like something a Microsoft product would generate.</p>
<p>And finally, the lists have double-click clickthroughs: when you click on the site name, it doesn&#8217;t take you to the site.  No, it lets you see the &lt;DD&gt; information, which then contains the link to the site.  That&#8217;s information that should have been contained in a rollover, with a &#8220;Show All&#8221; feature at the top.  But I guess McCain&#8217;s people are too busy enjoying their Ajax framework and their animated &#8220;please wait&#8221; graphic to program responsibly.</p>
<p>Bloated, overwrought, inappropriate emphasis, coming to a conclusion only as a side-effect of appearances: you can&#8217;t help but wonder if the whole thing is a metaphor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/08/16/john-mccains-website-a-professional-observation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Microsoft and violating the user&#8217;s expectations</title>
		<link>http://www.elfsternberg.com/2008/08/13/microsoft-and-violating-the-users-expectations/</link>
		<comments>http://www.elfsternberg.com/2008/08/13/microsoft-and-violating-the-users-expectations/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 16:13:39 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=33</guid>
		<description><![CDATA[I don&#8217;t usually do Microsoft Windows.  Unfortunately, company policy at the office for ${DAY_JOB} requires that I have a copy running somewhere so I can participate in the company calendar because the company, despite having a Unix background isn&#8217;t capable of actually running a Unix-based calendaring solution.  So I keep a vmware image [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t usually do Microsoft Windows.  Unfortunately, company policy at the office for ${DAY_JOB} requires that I have a copy running somewhere so I can participate in the company calendar because the company, despite having a Unix background isn&#8217;t capable of actually running a Unix-based calendaring solution.  So I keep a vmware image of Windows XP running quietly, down in the toolbar, and check it at set intervals throughout the day.</p>
<p>This morning I went to examine my calendar only to discover that Windows had &#8220;updated&#8221; itself sometime in the night and I had to log back in.  When I had, I saw the usual array of icons on the left.  I scrolled through them until I found the one for &#8220;Email,&#8221; and, this being vmware and a little slow as images are being pulled off-disk (over NFS, ouch!), I right-clicked to pull up the context menu.</p>
<p>And I couldn&#8217;t find &#8220;Open.&#8221;  I&#8217;ve been using various operating systems for years.  My <a href="http://www.nature.com/nrn/journal/vaop/ncurrent/full/nrn2473.html">attentional awareness</a> is optimized for that icon (refer to Scott McCloud&#8217;s <em>Understanding Comics</em>, a book which ought to be on every web developer&#8217;s bookshelf, for the discussion on how the word is the &#8220;ultimate abstract icon&#8221;), &#8220;OPEN&#8221;.</p>
<p>After a second of confusion, I realized there was an entry on the menu, &#8220;Read email&#8230;&#8221;</p>
<p>Thank you, Microsoft, for once again taking a familiar pattern and warping it to your own perverted ends.  Everyone knows how to &#8220;open&#8221; a letter, or a mailbox.  Why Outlook has to be different is not beyond me: you&#8217;re just trying to ruin the experience for everyone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/08/13/microsoft-and-violating-the-users-expectations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Added to library: Muse2HTML.py</title>
		<link>http://www.elfsternberg.com/2008/08/01/added-to-library-muse2htmlpy/</link>
		<comments>http://www.elfsternberg.com/2008/08/01/added-to-library-muse2htmlpy/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 18:17:41 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[emacs]]></category>

		<category><![CDATA[muse]]></category>

		<category><![CDATA[muse mode]]></category>

		<category><![CDATA[text processing]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=29</guid>
		<description><![CDATA[I was up last night hacking on my toolchain and getting it ready for production, and I realized that part of it could be ripped out and put up as a library.  I had searched for this library and found nothing, so I scratched that itch and tossed it together.  I use Emacs [...]]]></description>
			<content:encoded><![CDATA[<p>I was up last night hacking on my toolchain and getting it ready for production, and I realized that part of it could be ripped out and put up as a library.  I had searched for this library and found nothing, so I scratched that itch and tossed it together.  I use <a href="http://mwolson.org/projects/EmacsMuse.html">Emacs MUSE</a> mode for most of my fiction writing, and decided I was tired of having to rely on the full Emacs environment to export my stories to my <a href="http://www.pendorwright.com">other website</a>, so I wrote an exporter in python.</p>
<p>It&#8217;s very raw (isn&#8217;t everything I write &#8220;very raw?&#8221;) and it&#8217;s missing some functionality, but it&#8217;s good enough for me.  If it&#8217;s good enough for you, enjoy: <a href="http://elfsternberg.com/viewvc/muse2html/trunk">Muse2Html.py</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/08/01/added-to-library-muse2htmlpy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What the &#8216;new&#8217; operator means in Javascript</title>
		<link>http://www.elfsternberg.com/2008/07/29/what-the-new-operator-means-in-javascript/</link>
		<comments>http://www.elfsternberg.com/2008/07/29/what-the-new-operator-means-in-javascript/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 19:10:04 +0000</pubDate>
		<dc:creator>Elf Sternberg</dc:creator>
		
		<category><![CDATA[javascript]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.elfsternberg.com/?p=24</guid>
		<description><![CDATA[A few months ago, I asked a group of web deveropers what the new operator does in Javascript. There wasn&#8217;t much of a response, but I did eventually figure it out. Sometimes you just have to wade through the specifications. Here&#8217;s the outcome of my research:
[ECMA Version 3 (1999), section 11.2.2, page 56]
The production NewExpression [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago, I asked a group of web deveropers what the <tt>new</tt> operator does in Javascript. There wasn&#8217;t much of a response, but I did eventually figure it out. Sometimes you just have to wade through the specifications. Here&#8217;s the outcome of my research:</p>
<p>[ECMA Version 3 (1999), section 11.2.2, page 56]</p>
<p>The production NewExpression : new NewExpression is evaluated as follows:</p>
<p>   1. Evaluate NewExpression.<br />
   2. Call GetValue(Result(1)).<br />
   3. If Type(Result(2)) is not Object, throw a TypeError exception.<br />
   4. If Result(2) does not implement the internal [[Construct]] method, throw a TypeError exception.<br />
   5. Call the [[Construct]] method on Result(2), providing no arguments (that is, an empty list of arguments).<br />
   6. Return Result(5).</p>
<p>[Section 13.2.2, page 86]</p>
<p>When the [[Construct]] property for a Function object F is called, the following steps are taken:</p>
<p>   1. Create a new native ECMAScript object.<br />
   2. Set the [[Class]] property of Result(1) to &#8220;Object&#8221;.<br />
   3. Get the value of the prototype property of the F.<br />
   4. If Result(3) is an object, set the [[Prototype]] property of Result(1) to Result(3).<br />
   5. If Result(3) is not an object, set the [[Prototype]] property of Result(1) to the original Object prototype object as described in 15.2.3.1.<br />
   6. Invoke the [[Call]] property of F, providing Result(1) as the this value and providing the argument list passed into [[Construct]] as the argument values.<br />
   7. If Type(Result(6)) is Object then return Result(6).<br />
   8. Return Result(1).</p>
<p>I just wanted to put that somewhere where it wouldn&#8217;t get lost.</p>
<p>It also took me a while to realize that Result(N) means &#8220;the product after performing the operation of step N.</p>
<p>The <tt>new</tt> keyword allows you to define objects with prototypes, so that you can have a class heirarchy that doesn&#8217;t require external maintenence. I strongly suspect that Doug Crockford&#8217;s lecture on &#8220;prototypal inheritance&#8221; would be edifying here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.elfsternberg.com/2008/07/29/what-the-new-operator-means-in-javascript/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
