<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1" -->
<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/"
	>

<channel>
	<title>Superstable Blog</title>
	<link>http://www.superstable.net/blog</link>
	<description></description>
	<pubDate>Tue, 18 Sep 2007 20:00:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>
	<language>en</language>
			<item>
		<title>Some things don&#8217;t mix</title>
		<link>http://www.superstable.net/blog/2007/09/some-things-dont-mix/</link>
		<comments>http://www.superstable.net/blog/2007/09/some-things-dont-mix/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 15:32:33 +0000</pubDate>
		<dc:creator>Brendan Berg</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[Writing Software]]></category>

		<guid isPermaLink="false">http://www.superstable.net/blog/2007/09/some-things-dont-mix/</guid>
		<description><![CDATA[I&#8217;m flying to San Francisco. Right now. As we speak. I figured Richard Branson needed a few more bucks so I hopped on one of those shiny new A320s that everyone&#8217;s been talking about. This isn&#8217;t a review per se, but I think a few things are worth mentioning.
First things first. The planes are pretty. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m flying to San Francisco. Right now. As we speak. I figured Richard Branson needed a few more bucks so I hopped on one of those shiny new A320s that everyone&#8217;s been talking about. This isn&#8217;t a review <em>per se</em>, but I think a few things are worth mentioning.</p>
<p>First things first. The planes are pretty. Say what you want about the quality of LED light, but seeing blue overhead really takes the edge off the claustraphobia. The designer must have known we were flying to San Francisco, because the wall wash was the gayest pink lighting I&#8217;ve seen. And I&#8217;ve been to clubs in Chelsea.</p>
<p>OK. Enough chit-chat, let&#8217;s get to the point. There is a word that should never, ever be associated with an industry in the business of putting people in aluminum tubes traveling at a terrific clip while five miles above cold, hard rock: the C word. Even the IT guys bunkered up in airline data centers outside Topeka don&#8217;t say it. The servers don&#8217;t c%!*h, they have &#8220;unannounced service interruptions.&#8221; Or &#8220;unscheduled downtime.&#8221; Or something. </p>
<p>So I was surprised to see that the seat-back touch screens had a different word on them. I see this word on application splash screens before my computer experiences a fiery mid-air collision. The B word. Yeah, you&#8217;re right, I probably won&#8217;t jinx anything if I say this one. Beta. Beta. Beta beta beta.</p>
<p>Right. Two things. First, why is everyone saying beta when they really mean broken? I mean saying an airplane suffered mechanical fragmentation doesn&#8217;t change the fact that it&#8217;s in a million pieces and strewn across a field. And second, I really hope the electronic engine controls have had a few more revision cycles. OK, I do actually understand the difference between mission-critical software and, well, the kind that doesn&#8217;t kill you when it segfaults. So what is it about software that we interact with that makes it so much harder to write than the software that makes sure the wing flaps move when the pilot jiggles the control stick?</p>
<p>Let&#8217;s start with the control systems. This software is usually embedded, usually has input in expected ranges, and is usually written by engineers. Not people who call themselves &#8220;software engineers,&#8221; but actual engineers that studied, you know, engineering. Mission-critical software is carefully specified, written to exacting standards and tested thoroughly.</p>
<p>So why isn&#8217;t consumer software like that? Well first of all, those same engineers are the ones responsible for the hellish experience of programming your VCR. These folks spend their time talking to machines. They can do it better than anyone else, but it makes their interactions with actual people kind of awkward. Trust me, you don&#8217;t want to use software designed by someone who knows the difference between a bushing and a bearing&mdash;because they&#8217;ll expect you to know it too.</p>
<p>Software that doesn&#8217;t fuck up is different from software that you&#8217;d actually want to touch because different types of people write it. Not only is getting input from an airspeed sensor far easier than reacting to human actions, but the airspeed sensor is not likely to get pissed off when things don&#8217;t go its way. Engineers write code that&#8217;s unlikely to fail, but in order to make software that doesn&#8217;t drive people crazy, the programmer should have a pretty solid understanding of psychology.</p>
<p>What&#8217;s the moral of the story? Well, in this case, beta is an excuse for software that has very little understanding of the user&#8217;s psychology. Remember that, kids. In order to write software that interacts with a machine, you need to understand what&#8217;s going on inside that machine. If, instead, your software is intended for human interactions, you&#8217;d damn better understand what&#8217;s happening in the user&#8217;s head on more than a superficial level.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superstable.net/blog/2007/09/some-things-dont-mix/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is a dynamic language, anyway?</title>
		<link>http://www.superstable.net/blog/2007/03/what-dynamic-means/</link>
		<comments>http://www.superstable.net/blog/2007/03/what-dynamic-means/#comments</comments>
		<pubDate>Wed, 14 Mar 2007 17:19:49 +0000</pubDate>
		<dc:creator>Brendan Berg</dc:creator>
		
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://www.superstable.net/blog/2007/03/what-dynamic-means/</guid>
		<description><![CDATA[John Gruber has compiled a collection of links to discussions about the use of dynamic scripting languages for desktop application development. One of the sweeping generalizations made by nearly everybody involved in the discussion is the concept of a &#8220;dynamic language.&#8221; In his article The Planks in the Bridge, Jesper asserts that Ruby and Python [...]]]></description>
			<content:encoded><![CDATA[<p>John Gruber has compiled a collection of links to discussions about the <a href="http://daringfireball.net/2007/02/dynamic_scripting_languages">use of dynamic scripting languages for desktop application development</a>. One of the sweeping generalizations made by nearly everybody involved in the discussion is the concept of a &#8220;dynamic language.&#8221; In his article <a href="http://waffle.wootest.net/2007/02/16/the-planks-in-the-bridge/">The Planks in the Bridge</a>, Jesper asserts that Ruby and Python are more dynamic than Objective-C while Java is less dynamic. Unfortunately, it&#8217;s not entirely clear which features separate dynamic languages like Ruby and Python from less dynamic languages like Java.</p>
<p>Ruby and Python are interpreted, dynamically typed, and reflexive. A powerful combination it seems, but which features are the ones that make the languages powerful? What makes it easy to express certain ideas in some languages and hard to express them in others?</p>
<p class="heading">INTERPRETED LANGUAGES</p>
<p>The fact that Ruby and Python are referred to as interpreted languages, rather than compiled languages is just a red herring. The trade-off between interpreted and compiled languages is that of platform agnosticism vs. native speed. Programming languages form a continuum between these endpoints, with bytecode-interpreted languages like Java somewhere in the middle. Just-in-time compiling further blurs the distinction between interpreted and compiled. The fact that so-called dynamic languages fall in various places on the continuum shows that the choice compilation or interpretation has no bearing on what the language is capable of expressing. As it turns out, Objective-C &ndash; a compiled language &ndash; is <i>more</i> dynamic than Java, which is executed as bytecode in a virtual machine. Python, which is bytecode interpreted, and Ruby, which is interpreted, are both more dynamic than Java.</p>
<p>The advantage of an interpreted language is not manifested in language expressiveness, but in development efficiency. <strong>The power comes from reducing the code-compile-run-debug development cycle to code-interpret-debug</strong>. The downside, of course, is that interpreted code very often is slower. As the performance of virtual machines, runtime environments and interpreters improves, the distinction between interpreted and compiled languages will continue to blur. The bottom line however, is that interpretation as opposed to compilation doesn&#8217;t make a <em>language</em> dynamic.</p>
<p class="heading">DYNAMIC TYPING</p>
<p>It&#8217;s extremely difficult to shed light on all the subtleties of type systems, especially because the terminology is not widely agreed upon. Programming language researcher Benjamin C. Pierce had an amazingly difficult time trying to sort out the meaning of type system terminologies and eventually had to <a href="http://programming.reddit.com/info/t7v9/comments/ct8je">conclude</a> that &#8220;the usage of these terms is so various as to render them almost useless.&#8221;</p>
<p>In order to communicate effectively on this topic, I will attempt to avoid the obviously controversial terms in the taxonomy and carefully define the terms I do use. Let&#8217;s consider the declaration <code>int number = 5</code>, in which the variable declaration requires the identification of the variable&#8217;s type, an example of <b>explicit typing</b>. The opposite is an <b>implicitly typed</b> language, where the type of a variable is determined by the type of the value assigned to it. The term <b>statically typed</b> describes languages that require a variable to have only one type throughout the execution of a program, and <b>dynamically typed</b> to refer to languages where a variable may change type during execution. These two concepts are orthogonal; a type system can be explicit or implicit without any impact on whether it is static or dynamic.</p>
<p>There is some merit to the argument that dynamically typed languages are more flexible. <strong>Dynamic typing indeed provides more flexibility to the programmer, but it does not add any expressive power to the language</strong>. By that I mean that being able to re-use variable names is not a powerful feature. I have <em>never</em> seen a program in a dynamically typed language use variables in a way that couldn&#8217;t be written in a statically typed language simply by adding a few additional variables.</p>
<p>I imagine some people see explicit typing as programmatic bureaucracy, where each variable declaration requires an extra bit of paperwork to be submitted to the compiler or interpreter. I understand this sentiment to a degree, because <strong>explicit type declarations are technically unnecessary</strong>. A compiler can easily look at a program, deduce the datatype assigned to each variable and check for illegal operations even when datatypes are not explicitly defined in the program. In fact, <a href="http://en.wikipedia.org/wiki/ML_%28programming_language%29">ML</a>, which is type-checked at compile time, uses <a href="http://en.wikipedia.org/wiki/Type_inference">type inference</a> to deduce the datatype of the eventual evaluation of an expression, and does not require explicit datatype declarations.</p>
<p>However, it&#8217;s not always possible to determine the datatype of every single operation before the program executes. Programmers use typecast operations to reassure the compiler that, &#8220;yes, I know what I wrote may be unsafe, but trust me, it will work.&#8221; Most often, this sort of override of the type system can only be typechecked at runtime, which is why languages like Java have ClassCastExceptions. This distinction is unnecessary when discussing interpreted languages since such languages don&#8217;t have a separate compile time and runtime. All typechecking in these languages occurs during program execution.</p>
<p>But do these type system features make the <em>language</em> dynamic? My response is a resounding &#8220;No.&#8221; The details of <em>when</em> a program is type checked has very little to do with what a programmer can express in the language. Similarly, changing the type of a variable during execution or omitting a type declaration may make development easier, but <strong>the lack of dynamic and implicit type checking does not make certain programs impossible to express</strong>. Dynamic typing and implicit typing are done more out of convenience than for any expressive power they afford, and most arguments about the relative merits of either paradigm are really statements of personal preference.</p>
<p class="heading">REFLECTION</p>
<p>Reflection is the property of a language that gives programs the ability to observe and modify their own structure during execution. This set of features is borrowed from functional languages, especially LISP-based languages where program and data are one and the same. The typical set of reflective features are higher-order functions, introspection and runtime alteration of the object structure. </p>
<p>Higher-order functions are functions that (a) take one or more functions as input or (b) output a function. These sorts of functions are extremely powerful for creating reusable modules. For example, some languages have a map() function that applies a function to each element of an array. Additionally, some list implementations include a sort() function that takes a compare() function as an argument to sort the list based on the comparison.</p>
<p>Introspection is a fairly straightforward feature of dynamic languages. Essentially, it is the ability for a program to observe its own structure. On the most basic level, for example,  Java allows you to get the runtime class of an object by calling the <code>getClass()</code> method. From the object&#8217;s class, you can get any of its declared fields, constructors, methods, superclasses and interfaces. And of course, each <code>Field</code>, <code>Constructor</code>, <code>Method</code> or <code>Class</code> is an actual first-class object. Using introspection, you can create new instances of objects, modify values of declared fields and invoke methods on instances. Java&#8217;s limitation, however, is that you cannot modify class objects at runtime.</p>
<p>Run-time alteration of objects allows the programmer to modify the structure and behavior of objects programmatically. While Java does not allow you to add new methods or fields to objects, many more dynamic languages do. In fact it is this property of languages that make technologies like Cocoa bindings possible.</p>
<p>Jesper mentions Cocoa bindings in his article as an example of a feature that requires a dynamic language. Bindings take advantage of a mechanism called Key-Value Coding to notify observing objects when the value for a particular key is changed. <strong>To implement Key-Value Observing, you need to be able to modify the observed object at runtime, which Java plain doesn&#8217;t allow.</strong> KVO is possible in Objective-C through a technique called <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/KVOImplementation.html">isa-swizzling</a>, where an intermediate class is inserted to catch and respond to messages, forwarding them to the observed class.</p>
<p>Isa-swizzling is an extra-linguistic feature: there is no Objective-C syntax to insert intermediate objects. <strong>It essentially uses the low-level nature of C as a back door into the inner workings of Objective-C</strong>, which is ultimately just an object-oriented facade. There are languages that are more dynamic than Objective-C that provide syntax for exactly these types of manipulations, and they are these features that make dynamic languages powerful.</p>
<p class="heading">LANGUAGE DYNAMICS</p>
<p>Perhaps it is no coincidence that the word <i>dynamic</i> comes from the Greek word for power. The reflexive features that make a language dynamic also make it powerful. The idea that the object structure and control structure of a program can be defined once and not change is outdated. The languages that allow people to write flexible programs are the ones that have real power, and they are the languages that will gain momentum as more programmers discover the power they have been given.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superstable.net/blog/2007/03/what-dynamic-means/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello, world!</title>
		<link>http://www.superstable.net/blog/2007/02/hello-world/</link>
		<comments>http://www.superstable.net/blog/2007/02/hello-world/#comments</comments>
		<pubDate>Sun, 18 Feb 2007 04:10:02 +0000</pubDate>
		<dc:creator>Brendan Berg</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.superstable.net/blog/2007/02/hello-world/</guid>
		<description><![CDATA[While I&#8217;ve always considered publishing my thoughts on human-computer interaction, I&#8217;ve had reservations about starting a blog. The balance has finally tipped in favor of publishing, and here&#8217;s why.
First of all, I&#8217;m starting a software company. One of the reasons some start-ups fail is due to lack of marketing. I could be developing the coolest [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;ve always considered publishing my thoughts on human-computer interaction, I&#8217;ve had reservations about starting a blog. The balance has finally tipped in favor of publishing, and here&#8217;s why.</p>
<p>First of all, I&#8217;m starting a software company. One of the reasons some start-ups fail is due to lack of marketing. I could be developing the coolest software in the world, but that software is worthless to me unless people know about it. As it turns out, one of the easiest ways to get the word out is through blogging. Chris Campbell of Particletree makes the argument that blogging is the cheapest and perhaps most effective way to gain mind-share on the web. Therefore it&#8217;s no surprise that he has posted an <a href="http://particletree.com/features/an-argument-for-small-business-blogging/">argument for small-business blogging</a> on his company&#8217;s blog.</p>
<p>The company I&#8217;m starting is extremely focused on the importance of intuitive interfaces to application development, and I’ve had a number of conversations with people about human-computer interaction in its many forms. Very few people in the technology industry are interested in this particular field, and even within the field fewer still are driven by an obsessive sense of perfectionism. We have seen only incremental improvements in usability since the introduction of the WIMP (windows, icons, menus, pointer) model of graphical interface. It is therefore extremely important that those people working in the field engage in discourse to push each other along. With more people thinking about and discussing human-computer interaction, we have more of a chance to improve the HCI landscape.</p>
<p>Since cheap, high-volume publishing is possible on the Web, everybody has a voice. That doesn’t necessarily mean that everybody has something to say. I used to have a fatalistic view of the signal-to-noise ratio, but now I believe that the clear, insightful voices are capable of cutting through the din. Credibility is earned, and the good bloggers develop a reputation for their quality. As a consequence, I believe those voices with nothing to contribute will fade into the background. Perhaps the casual nature of blogging is partly to blame for the vapidity of most blogs. The author William Gibson theorized that <a href="http://www.williamgibsonbooks.com/blog/2003_05_01_archive.asp#200235680">the frequent-update culture encourages writers to post too soon</a>. Traditional writing is a process of constant revision, while the format of a blog encourages informal, stream-of-consciousness writing. Bloggers end up publishing an article before it’s fully thought out, and for that reason, the writing doesn&#8217;t take flight. The bloggers I respect work on articles for weeks before posting, thoroughly revising and polishing. I expect that my posts, too, will be more infrequent than on most blogs &mdash; I prefer quality over quantity.</p>
<p>The conversation between a writer and the community of readers that is afforded by blogging is significant, but the importance of a conversation between writers is often overlooked. Bloggers with thoughtful opinions on human-computer interaction, whether they are in the academic world or in industry should use the medium as a way to share ideas and to challenge each other into pushing the field forward. Therefore, this blog is intended to be one part of a larger discussion, and in the end the discourse is more important than the individual contributors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.superstable.net/blog/2007/02/hello-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
