<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Monomorphic &#187; Software development</title>
	<atom:link href="http://www.monomorphic.org/wordpress/category/dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monomorphic.org/wordpress</link>
	<description>Conceptual meandering</description>
	<lastBuildDate>Wed, 11 Jan 2012 02:07:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Platonism and the dominant decomposition</title>
		<link>http://www.monomorphic.org/wordpress/platonism-and-the-dominant-decomposition/</link>
		<comments>http://www.monomorphic.org/wordpress/platonism-and-the-dominant-decomposition/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 17:33:43 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[composition]]></category>
		<category><![CDATA[epistemology]]></category>
		<category><![CDATA[nietzsche]]></category>
		<category><![CDATA[ontologies]]></category>
		<category><![CDATA[platonism]]></category>
		<category><![CDATA[poplar]]></category>
		<category><![CDATA[programming languages]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=1020</guid>
		<description><![CDATA[I&#8217;m in Portland, Oregon for the SPLASH conference. There&#8217;s a lot of energy and good ideas going around. I gave a talk about my project, Poplar, at the FREECO workshop. At the same workshop there was a very interesting talk given by Klaus Ostermann, outlining some of the various challenges facing software composition. He linked [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in Portland, Oregon for the <a href="http://www.splashcon.org">SPLASH</a> conference. There&#8217;s a lot of energy and good ideas going around.</p>
<p>I gave a talk about my project, <a href="http://www.poplar-lang.org">Poplar</a>, at the <a href="http://trese.ewi.utwente.nl/workshops/FREECO/FREECO-Onward2011/home.html">FREECO</a> workshop. At the same workshop there was a very interesting talk given by Klaus Ostermann, outlining some of the various challenges facing software composition. He linked composition of software components to concepts in classical logic, and informally divided composition into a light side and a dark side. On the light side are ideal concepts such as monotonicity (the more axioms we have, the more we can prove), absence of side effects and a single, canonical decomposition of everything. On the dark side are properties such as side effects, the absence of a single decomposition, knowledge that invalidates previously obtained theorems, and so on.</p>
<p>One of the ideas that resonated the most with me is the tyranny of the dominant decomposition. (For instance, a single type hierarchy). Being forced to decompose a system in a single way at all times implies only having a single perspective on it. Is this not platonism coming back to haunt us in programming languages? (Ostermann did indeed say that he suspects that mathematics and the natural sciences have had too much influence on programming). What we might need now is an antiplatonism in programming: we might need subjectivist/perspectivist programming languages. If components can view their peer components in different ways, depending on their domain and their interests (i.e. what kind of stakeholders they are), we might truly obtain flexible, evolvable, organic composition.</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=1020&amp;md5=aab39ff709a53e33a585f94992d25b1f" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/platonism-and-the-dominant-decomposition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What makes a good programming language?</title>
		<link>http://www.monomorphic.org/wordpress/what-makes-a-good-programming-language/</link>
		<comments>http://www.monomorphic.org/wordpress/what-makes-a-good-programming-language/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 09:00:09 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[academic]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=1012</guid>
		<description><![CDATA[New programming languages are released all the time. History is littered with dead ones. There are also many long time survivors in good shape, as well as geriatric languages on life support. What makes a programming language attractive and competitive? How can we evaluate its quality? There are many different aspects of this problem. Ease [...]]]></description>
			<content:encoded><![CDATA[<p>New programming languages are released all the time. History is littered with dead ones. There are also many long time survivors in good shape, as well as geriatric languages on life support.</p>
<p>What makes a programming language attractive and competitive? How can we evaluate its quality? There are many different aspects of this problem.</p>
<p><strong>Ease of reading and writing</strong>, or: directness of the mapping between the problem in your head and the model you are creating on the computer. This can be highly domain dependent, for instance languages such as LaTeX, Matlab and R are designed with specific problems in mind and cater to users from that domain. Their limits show quickly when you try to stretch them beyond their envisioned purpose. Speaking of general programming languages, I think Python deserves to be mentioned as a language that is extremely readable and writable. It has other shortcomings though &#8211; see below. Prolog is also highly read- and writable if it suits your problem.</p>
<p><strong>Runtime performance. </strong>Arguably this is one of the few reasons to bother with using C++. For the majority of programming projects though, performance is much less of a problem than one might think, especially if one considers how close the performance of many JVM languages get to C++. When programmers think about their overall productivity and effectiveness in developing and maintaining a system, C++ is often not the best choice, obviously.</p>
<p><strong>Scalability to large teams. </strong>The key property here is: does the language do anything to help me, as a developer, work with code that other people wrote? Ease of maintenance may be strongly correlated with usability in large teams. An anti-pattern here is languages that allow for solving the same problem in a huge amount of ways with very variable syntax. For instance, Perl and C++ can lead to notoriously unmaintainable code if used carelessly. Some say that Scala also suffers from this problem. Basically, the language helps here if it prevents me from doing things that other developers might not expect, and that I might forget to document or communicate. This is why Gosling famously called Java a blue collar language; it restricts you enough to make teamwork quite practical. It even restricts the layout of your source file hierarchy. (Now we begin to see that some goals are in conflict with each other).</p>
<p><strong>Scalability to large systems. </strong>This is related to the preceding property, but whereas team scalability seems to be mainly about avoiding the creation of code fragments that surprise people other than their creators, system size scalability seems to be about avoiding the creation of code fragments that surprise other code fragments. Here one needs invariants, good type checking, static constraints of all kinds. Scripting languages like Perl and Python, lacking static typing completely, are some of the worst in this regard, since we cannot even be sure at startup time that methods we try to invoke on objects exist at all (Python).</p>
<p><strong>Scalability over time (maintainability).</strong>Â If there is both system size scalability and team scalability, then the system is also likely to be able to live for a long time without great troubles.</p>
<p><strong>Developer efficiency and rapid prototyping. </strong>Depending on the nature of the system being developed, this may depend on several different properties listed above.</p>
<p><strong>Availability of quality tools.</strong>Â Mature runtime environments, such as the JVM, have many more high quality tools and IDEs available than a language than Ruby. Mature languages also have more compilers for more different architectures available.</p>
<p>These points begin to give us an idea of how we can evaluate programming languages. However, I also believe that making a good language and making people use it is largely about luck and factors outside the design itself. Just like there&#8217;s a big step between imagining and specifying an utopian society and making that social order an actuality, there&#8217;s a big step between designing an ideal programming language and achieving widespread adoption for it. We have seen a way forward though: with generalised runtime environments such as the JVM and the CLR, we may develop and deploy languages that take advantage of a lot of existing infrastructure much more easily than before. And what I hope for is in fact that it becomes even easier to deploy new languages, and that new languages are as interoperable as possible (insofar as it doesn&#8217;t constrain their design), so that we could see more competition, more evolution and more risk taking in the PL space.</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=1012&amp;md5=fff6eeac12b2b852112ea787fe9ec90f" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/what-makes-a-good-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pointers in programming languages</title>
		<link>http://www.monomorphic.org/wordpress/pointers-in-programming-languages/</link>
		<comments>http://www.monomorphic.org/wordpress/pointers-in-programming-languages/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 15:21:03 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[academic]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[reuse]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[state]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=1006</guid>
		<description><![CDATA[It is likely that few features cause as much problems as pointers and references in statement-oriented languages, such as C, C++ and Java. They are powerful, yes, and they allow us to control quite precisely how a program is to represent something. We can use them to conveniently compose objects and data without the redundancy [...]]]></description>
			<content:encoded><![CDATA[<p>It is likely that few features cause as much problems as pointers and references in statement-oriented languages, such as C, C++ and Java. They are powerful, yes, and they allow us to control quite precisely how a program is to represent something. We can use them to conveniently compose objects and data without the redundancy of replicating information massively. In languages like C they are even more powerful than in Java, since just about any part of memory can be viewed as if it were just about anything through the use of pointer arithmetic, which is indeed frightening.</p>
<p>But they also complicate reasoning about programs enormously. Both human reasoning and automated reasoning. Pointers allow any part of the program to have side effects in any other part of the program (if we have a reference to an object that originated there), and they make it very hard to reason about the properties that an object might have at a given point in time (since we generally have no idea who might hold a reference to it &#8211; it is amazing that programmers are forced to track this in their heads, more or less). In my effort to design my own language, multiple pointers to the same objects &#8211; aliases &#8211; have come back from time to time to bite me and block elegant, attractive designs. I believe that this is a<em> very </em>hard problem to design around. Aliased pointers set up communication channels between arbitrary parts of a program.</p>
<p>Nevertheless attempts have been made, in academia and in research labs, to solve this problem. Fraction-based permissions track how many aliases exist and endow each alias with specific permissions to access the object that is referred to. Ownership analysis forces access to certain objects to go through special, &#8220;owning&#8221; objects. Unique or &#8220;unshared&#8221; pointers in some language extensions restrict whether aliases may be created or not. But so far no solution has been extremely attractive and convenient, and none has made it into mainstream languages. (<del>I know that someone</del> Philipp HallerÂ made a <a href="http://lamp.epfl.ch/~phaller/readme_uniqueness.html">uniqueness plugin for the Scala compiler</a>, but it is not in wide use, I believe.)</p>
<p>If we are to attempt further incremental evolution of the C-family languages, aliased pointers are one of the most important issues we can attack in my opinion.</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=1006&amp;md5=45794a6be4c8cfc42a0be706de7eb18b" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/pointers-in-programming-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JTronic, a programming game</title>
		<link>http://www.monomorphic.org/wordpress/jtronic-a-programming-game/</link>
		<comments>http://www.monomorphic.org/wordpress/jtronic-a-programming-game/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 06:51:28 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=894</guid>
		<description><![CDATA[Now for something quite different from the philosophical entries I&#8217;ve been writing recently. We finally got the time to release the game &#8220;JTron&#8221; on Sourceforge. It is there under its new name Jtronic. This game is designed for programming competitions; participants program an agent that plays the game by obtaining information about its environment and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.monomorphic.org/wordpress/wp-content/uploads/2011/03/screenshot.png"><img class="alignleft size-medium wp-image-895" style="margin: 1em;" title="screenshot" src="http://www.monomorphic.org/wordpress/wp-content/uploads/2011/03/screenshot-300x226.png" alt="" width="300" height="226" /></a></p>
<p>Now for something quite different from the philosophical entries I&#8217;ve been writing recently. We finally got the time to release the game &#8220;JTron&#8221; on Sourceforge. It is there under its new name <a href="http://sourceforge.net/projects/jtronic/">Jtronic</a>.</p>
<p>This game is designed for programming competitions; participants program an agent that plays the game by obtaining information about its environment and making decisions. The programming language is Java. The game itself combines features of Pac-man and Tron in what we think is an interesting synthesis.</p>
<p>This game was used for the <a href="http://icpc2010.honiden.nii.ac.jp/">ACM-ICPC regional contest in Tokyo 2010</a>, for the &#8220;Java Challenge&#8221; part. I&#8217;ve had the honour to work with some great people in the Honiden lab in developing this game, and we spent time on it on and off for almost a year. A very educational process, and the final result was not bad at all.</p>
<p>If you can program in Java, you can have fun with this framework by programming your own agent and competing against others (including some pre-made ones that are included in the release), or you can contribute to the game framework itself, should you feel so inclined. It&#8217;s GPL licensed. The documentation is still slightly sparse, but we will release more &#8220;shortly&#8221;.</p>
<p>A similar framework is the <a href="http://queue.acm.org/icpc/">&#8220;Icy Challenge&#8221;</a> that was used in the world final ICPC Java Challenge. It hasÂ much nicer graphics than our game. Maybe someone would take the time to make 3D graphics for JTronic?</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=894&amp;md5=690ca61c1a90c9da41f87f7f088873e3" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/jtronic-a-programming-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Scala? (2) Compact syntax applied to probabilistic actions</title>
		<link>http://www.monomorphic.org/wordpress/why-scala-2-compact-syntax-applied-to-probabilistic-actions/</link>
		<comments>http://www.monomorphic.org/wordpress/why-scala-2-compact-syntax-applied-to-probabilistic-actions/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 22:13:36 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=671</guid>
		<description><![CDATA[As a little fun project, I developed some probabilistic cellular automata with Scala and very basic AWT graphics. I continue to become more proficient with Scala, and it feels increasingly natural to use. During this exercise I came up with something that I thought was particularly elegant, and that I am pretty sure would have [...]]]></description>
			<content:encoded><![CDATA[<p>As a little fun project, I developed some probabilistic cellular automata with Scala and very basic AWT graphics. I continue to become more proficient with Scala, and it feels increasingly natural to use. During this exercise I came up with something that I thought was particularly elegant, and that I am pretty sure would have been a lot less readable in Java. I will just reproduce the interesting bits. The basic idea is that I want cells on a 2D grid to take certain redrawing actions according to given probabilities. First, I define this utility function:</p>

<div class="wp_syntax"><div class="code"><pre class="scala" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">object</span> Util <span style="color: #F78811;">&#123;</span>
&nbsp;
	<span style="color: #008000; font-style: italic;">//sum of floats (probabilities) should be at most 1.0</span>
	<span style="color: #0000ff; font-weight: bold;">def</span> multiAction<span style="color: #F78811;">&#40;</span>acts<span style="color: #000080;">:</span> Seq<span style="color: #F78811;">&#91;</span>Tuple2<span style="color: #F78811;">&#91;</span><span style="color: #F78811;">&#40;</span><span style="color: #F78811;">&#41;</span><span style="color: #000080;">=&gt;</span> Unit, Float<span style="color: #F78811;">&#93;</span><span style="color: #F78811;">&#93;</span><span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=</span> <span style="color: #F78811;">&#123;</span>
		<span style="color: #0000ff; font-weight: bold;">val</span> r <span style="color: #000080;">=</span> Math.<span style="color: #000000;">random</span>
		<span style="color: #0000ff; font-weight: bold;">var</span> soFar<span style="color: #000080;">:</span> Float <span style="color: #000080;">=</span> <span style="color: #F78811;">0</span>
		<span style="color: #0000ff; font-weight: bold;">var</span> acted <span style="color: #000080;">=</span> <span style="color: #0000ff; font-weight: bold;">false</span>
		<span style="color: #0000ff; font-weight: bold;">for</span> <span style="color: #F78811;">&#40;</span><span style="color: #F78811;">&#40;</span>act,prob<span style="color: #F78811;">&#41;</span> <span style="color: #000080;">&lt;</span>- acts<span style="color: #F78811;">&#41;</span> <span style="color: #F78811;">&#123;</span>
			soFar +<span style="color: #000080;">=</span> prob
&nbsp;
			<span style="color: #0000ff; font-weight: bold;">if</span> <span style="color: #F78811;">&#40;</span>soFar <span style="color: #000080;">&gt;</span> r <span style="color: #000080;">&amp;&amp;</span> <span style="color: #000080;">!</span>acted<span style="color: #F78811;">&#41;</span> <span style="color: #F78811;">&#123;</span>
				act<span style="color: #F78811;">&#40;</span><span style="color: #F78811;">&#41;</span>	
				acted <span style="color: #000080;">=</span> <span style="color: #0000ff; font-weight: bold;">true</span>
			<span style="color: #F78811;">&#125;</span>
		<span style="color: #F78811;">&#125;</span>
	<span style="color: #F78811;">&#125;</span>
&nbsp;
<span style="color: #F78811;">&#125;</span></pre></div></div>

<p>The idea here is that we supply a list of tuples. The first element of each tuple is a function, and the second element is a float value between 0 and 1 representing the probability that each function is evaluated. Only one of the functions supplied is actually evaluated.</p>
<p>This is how I put it to use (excerpt from another class):</p>

<div class="wp_syntax"><div class="code"><pre class="scala" style="font-family:monospace;">Util.<span style="color: #000000;">multiAction</span><span style="color: #F78811;">&#40;</span>
  List<span style="color: #F78811;">&#40;</span> 
  <span style="color: #F78811;">&#40;</span><span style="color: #F78811;">&#40;</span><span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=&gt;</span> <span style="color: #F78811;">&#123;</span>
     cellsWrite<span style="color: #F78811;">&#40;</span>x, y-<span style="color: #F78811;">1</span><span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=</span> cellsRead<span style="color: #F78811;">&#40;</span>x, y-<span style="color: #F78811;">1</span><span style="color: #F78811;">&#41;</span> + 0.01f<span style="color: #000080;">;</span>
     cellsWrite<span style="color: #F78811;">&#40;</span>x, y+<span style="color: #F78811;">1</span><span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=</span> cellsRead<span style="color: #F78811;">&#40;</span>x, y+<span style="color: #F78811;">1</span><span style="color: #F78811;">&#41;</span> + 0.01f 
    <span style="color: #F78811;">&#125;</span>, 0.2f<span style="color: #F78811;">&#41;</span>,
  <span style="color: #F78811;">&#40;</span><span style="color: #F78811;">&#40;</span><span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=&gt;</span> <span style="color: #F78811;">&#123;</span> 
     cellsWrite<span style="color: #F78811;">&#40;</span>x+<span style="color: #F78811;">1</span>, y<span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=</span> cellsRead<span style="color: #F78811;">&#40;</span>x+<span style="color: #F78811;">1</span>, y<span style="color: #F78811;">&#41;</span> + 0.01f<span style="color: #000080;">;</span>
     cellsWrite<span style="color: #F78811;">&#40;</span>x-<span style="color: #F78811;">1</span>, y<span style="color: #F78811;">&#41;</span> <span style="color: #000080;">=</span> cellsRead<span style="color: #F78811;">&#40;</span>x-<span style="color: #F78811;">1</span>, y<span style="color: #F78811;">&#41;</span> + 0.01f 
    <span style="color: #F78811;">&#125;</span>, 0.1f<span style="color: #F78811;">&#41;</span>
 <span style="color: #F78811;">&#41;</span>
<span style="color: #F78811;">&#41;</span></pre></div></div>

<p>Once you take in the braces here it is actually quite simple. We have two anonymous functions taking zero parameters of two statements each. The first one has probability 0.2 and the second probability 0.1, meaning that there&#8217;s a 70% probability that nothing will happen. We can also make an arbitrarily long list of such functions on the fly.</p>
<p>To the best of my knowledge, the only way of reproducing this flexibility in Java would be to create anonymous inner classes and put them inside an array. Certainly that would be quite a bit more verbose than this.</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=671&amp;md5=06e00967ad2407bd4d0aa599e06b834f" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/why-scala-2-compact-syntax-applied-to-probabilistic-actions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The aesthetics of technology</title>
		<link>http://www.monomorphic.org/wordpress/the-aesthetics-of-technology/</link>
		<comments>http://www.monomorphic.org/wordpress/the-aesthetics-of-technology/#comments</comments>
		<pubDate>Tue, 18 May 2010 14:20:51 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[darwinism]]></category>
		<category><![CDATA[human condition]]></category>
		<category><![CDATA[society]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=583</guid>
		<description><![CDATA[Different technologies have different kinds of aesthetics, and they affect us in various ways, whether we are particularly fascinated with technology or not. The easiest technologies to understand on an intuitive-emotional basis seem to be those that involve physical processes. Objects rotating, moving, being lifted and displaced, compressed, crushed. Gases and liquids being sent around [...]]]></description>
			<content:encoded><![CDATA[<p>Different technologies have different kinds of aesthetics, and they affect us in various ways, whether we are particularly fascinated with technology or not.</p>
<p>The easiest technologies to understand on an intuitive-emotional basis seem to be those that involve physical processes. Objects rotating, moving, being lifted and displaced, compressed, crushed. Gases and liquids being sent around in conduits, mediating force and energy. In short, the technology that has its foundation in classical mechanics.</p>
<p><a href="http://en.wikipedia.org/wiki/Steam_engine"><img class="alignleft size-medium wp-image-584" style="margin:1em" title="steamEngine" src="http://www.monomorphic.org/wordpress/wp-content/uploads/2010/05/steamEngine-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>If these are easy to <em>get a feel for</em>, it would probably be in part because an understanding of mechanical processes has been of use to us throughout history, and also before the advent of civilisation. An intuitive understanding of things such as momentum, acceleration, gravity has no doubt benefited mankind and its ancestors for a very long time.</p>
<p>It gets trickier when we get to the more recent technologies. Take electricity to be an arbitrary watershed. We have no intuitive idea of what electricity is, apart from the fact we might be afraid of thunder. Electricity has to be taught through the abstract idea of electrons flowing in conduits, a bit like water in pipes (to name one of many images being used).</p>
<p>And then there&#8217;s analog and digital electronics, integrated circuits, semiconductors and so on, where intuition has long ago been left behind. We are forced to approach these things in a purely abstract domain.</p>
<p><a href="http://www.monomorphic.org/wordpress/wp-content/uploads/2010/05/earlyLed.jpg"><img class="alignleft size-medium wp-image-591" style="margin:1em" title="earlyLed" src="http://www.monomorphic.org/wordpress/wp-content/uploads/2010/05/earlyLed-300x90.jpg" alt="" width="300" height="90" /></a>Yet, when our Mp3 players, game consoles, mobile phones and computers do things for us, we are left with a sense of wonder. Our minds, always looking for stories and explanations, want to associate the impressive effects produced by these devices with some stimuli. With a steam engine, it&#8217;s easy to associate the energy with pressure, heat and motion, all of which are well understood on a low level. With a mobile phone, not so much. A lot of very abstract stories have to be used in order to reach anything that resembles an explanation, and still it doesn&#8217;t reach the essence of the device, which might be in its interplay between radio transceivers, sound codec chips, a display with a user interface and software to drive it, a central CPU, and so on, together with, of course, the network of physical antennas and their connectivity with other such networks. Is it too much to suppose that the human mind often stops short of the true explanation here? That we associate the effects produced by the device with what we can touch, smell, see and hear?</p>
<p><a href="http://en.wikipedia.org/wiki/Computer_terminal"><img class="alignleft size-medium wp-image-586" style="margin:1em" title="crtTerminal" src="http://www.monomorphic.org/wordpress/wp-content/uploads/2010/05/crtTerminal-300x257.jpg" alt="" width="300" height="257" /></a> This is of course the point where many computer geeks worldwide start to feel a certain affection for the materials that make up the machines. Suppose that we are in the 1980&#8242;s. Green text on a black terminal background. A particular kind of fixed width font. The clicking of the keyboard. The dull grey plastic used to make the case. All of these things can acquire a lot of meaning that they don&#8217;t really have, because the users lack a window (physical and emotional) into the essence of the machine. The ultimate &#8220;disconnected machine&#8221;, to relate to my field, is software.</p>
<p>This brings up questions such as: how far can we as a species proceed with technology that we cannot understand instinctively, how can we teach such technology meaningfully and include it in democratic debate, and how can we use people&#8217;s tendencies to associate sensory stimuli with meaning and effects in a more meaningful way? &#8211; for instance, when we design hardware and software interfaces.</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=583&amp;md5=e6d99e50fc5c4ae29c6bed6a6402b429" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/the-aesthetics-of-technology/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Doing generality right</title>
		<link>http://www.monomorphic.org/wordpress/doing-generality-right/</link>
		<comments>http://www.monomorphic.org/wordpress/doing-generality-right/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 02:00:02 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[HCI]]></category>
		<category><![CDATA[platforms]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[reuse]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=558</guid>
		<description><![CDATA[Many software developers, while making a tool to solve a specific problem, heed the siren call of generality. By making a few specific changes, they can turn the tool into a general framework for solving a larger class of problems. And then, with a few more changes, an even larger class of problems, and so [...]]]></description>
			<content:encoded><![CDATA[<p>Many software developers, while making a tool to solve a specific problem, heed the siren call of generality. By making a few specific changes, they can turn the tool into a general framework for solving a larger class of problems. And then, with a few more changes, an even larger class of problems, and so on. This often turns into a trap, and there is a risk that the end of the line is an over-generalised tool that isn&#8217;t very good at solving any problem, because the specificity that was present in the first place was part of why it was powerful. In this way, constraints can equal freedom.</p>
<p>Sometimes, though, the generalizers get it right. These are often moments of exceptional and lasting innovation. One example of such a system is the fabulously influential (but today, not that widely used) programming language <a href="http://www.smalltalk.org">Smalltalk</a>. Invented by the former jazz guitarist and subsequent Turing award winner <a href="http://en.wikipedia.org/wiki/Alan_Kay">Alan Kay</a>, Smalltalk was released as one of the first true object-oriented programming languages in 1980. It is probably still ahead of its time. It runs on a virtual machine, it has reflection, everything is an object, and the separation between applications is blurred in favour of a big object box. On running <a href="http://www.squeak.org/">Squeak</a>, a popular Smalltalk implementation, with its default system image today, users discover that all the objects on the screen, including the IDE to develop and debug objects, appear to follow the same rules. No objects seem to have special privileges.</p>
<p>Another such system is an application that used to be shipped on Mac computers in the distant past, <a href="http://en.wikipedia.org/wiki/HyperCard">Hypercard</a>. Hypercard enabled ordinary users to create highly customized software using the idea of filing cards in a drawer as the underlying model, blurring the line between end users and developers through its accessibility. I haven&#8217;t had the privilege to use it myself, but it seems like this was as powerful as it was because it served up a homogenous and familiar model, where everything was a card, and yet the cards had considerable scope for modification and special features. Even though, in some ways, this system appears to be a database, the cards didn&#8217;t need to have the same format, for instance. (Are we seeing this particular idea being recycled in a more enterprisey form in <a href="http://couchdb.apache.org/">CouchDB</a>?)</p>
<p>There are more examples of successful highly general design: the Unix file system, TCP/IP sockets and so on. They all have in common that they are easy to think about as a mental model, since a universal set of rules apply to all objects, they scale well in different directions when used for different purposes, and they give the user a satisfying sense of empowerment, <a href="http://www.monomorphic.org/wordpress/making-playtime-useful-with-color-filling-games/">blurring the line between work and play</a> to draw on the user&#8217;s natural creativity. Successful general systems are the ones that can be easily applied in quite varied situations without tearing in the seams.</p>
<p>While not widely used by industrial programmers today, Smalltalk was incredibly influential. In 1981 Objective-C was created by Brad Cox and Tom Love, directly inspired by what the Smalltalk designers had done. Objective-C was subsequently used as the language of choice for NeXTStep, and later for Apple&#8217;s MacOS X when Apple bought NeXT. Today it&#8217;s seeing a big surge in popularity thanks to devices like the iPhone, on which it is also used. In 1995 Java was introduced, owing a great deal of its design to Objective-C, but also introducing features such as a universal virtual machine and garbage collection, which Objective-C didn&#8217;t have at the time. In some sense, both Objective-C and Java are blends of the C-family languages and Smalltalk. Tongue in cheek, we might say that it seems evolution in industrial programming these days consists of finding blends that contain less of the C model and more of smalltalk or functional programming.</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=558&amp;md5=4284f16331bd64cda77d45a7dcf90333" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/doing-generality-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overloading words in research and programming</title>
		<link>http://www.monomorphic.org/wordpress/overloading-words-in-research-and-programming/</link>
		<comments>http://www.monomorphic.org/wordpress/overloading-words-in-research-and-programming/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 06:16:22 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[human condition]]></category>
		<category><![CDATA[Natural language]]></category>
		<category><![CDATA[ontologies]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=540</guid>
		<description><![CDATA[In research and academia, one of the fundamental activities is the invention and subsequent examination of new concepts. For concepts, we need names. One way of making a name is stringing words together until the meaning is sufficiently specific. E.g. &#8220;morphism averse co-dependent functor substitutions in virtual machine transmigration systems&#8221;. Thus the abstruse academic research [...]]]></description>
			<content:encoded><![CDATA[<p>In research and academia, one of the fundamental activities is the invention and subsequent examination of new concepts. For concepts, we need names.</p>
<p>One way of making a name is stringing words together until the meaning is sufficiently specific. E.g. &#8220;morphism averse co-dependent functor substitutions in virtual machine transmigration systems&#8221;. Thus the abstruse academic research paper title is born.</p>
<p>Sciences sometimes give new meanings to existing words. This could be called overloading, following the example of object-oriented programming. E.g. a &#8220;group&#8221; in mathematics is something different from the everyday use of the term. A &#8220;buffer&#8221; in chemistry is something different from a software or hardware buffer, even though a fragment of similarity is there. And so on. This overloading of words gives newcomers to the field a handle on what is meant, but full understanding is still impossible without understanding the actual definitions being employed.</p>
<p>Sometimes new terms can be created using inventors&#8217; names and everyday words. E.g. a &#8220;Lie group&#8221; or the &#8220;Maxwell equations&#8221;, or &#8220;Curry-Howard correspondence&#8221;. This is potentially useful, but perhaps not something you can do freely with your own research without seeming like you&#8217;re trying to inflate your ego excessively. (Even though researchers love inflating their egos, nobody wants to admit it.)</p>
<p>There&#8217;s a similar problem in software development. When we invent names of functions, classes and variables, the lack of words becomes very clear. Intuitively, what is an &#8220;adapter registry&#8221;? An &#8220;observer list&#8221;? Or an &#8220;observer list mediation adapter?&#8221; My feeling is that we often end up compounding abstract words because we have no better choice. And here lies a clue to some of the apparent impermeability of difficult source code. We need better ways of making names. We&#8217;re inventing ideas faster than our language can stretch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/overloading-words-in-research-and-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gregorian misery</title>
		<link>http://www.monomorphic.org/wordpress/gregorian-misery/</link>
		<comments>http://www.monomorphic.org/wordpress/gregorian-misery/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 02:12:47 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[papal]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=541</guid>
		<description><![CDATA[The Gregorian calendar has been in use since 1582. Among its features is a moderately complicated rule for leap years: if n mod 4 is 0, then n is a leap year. However, if n mod 100 is 0, then n is not a leap year, unless n is a multiple of 400. In addition, [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/Gregorian_calendar">Gregorian calendar</a> has been in use since 1582. Among its features is a moderately complicated rule for leap years: if <em>n mod 4</em> is 0, then <em>n</em> is a leap year. However, if <em>n mod 100 </em> is 0, then <em>n </em>is not a leap year, unless <em>n</em> is a multiple of 400.</p>
<p>In addition, we live in a world with timezones and regional differences in when countries go on and off daylight savings time, if they have such a system. As yet another example of Japanese rationality, Japan does not have a DST system.</p>
<p>Implementing date and time computations correctly can be very hard for computer programmers and is invariably a source of many hidden bugs that may take a long time to discover. Yesterday, a large amount of Sony&#8217;s Playstation 3 game consoles <a href="http://news.cnet.com/8301-17938_105-10461364-1.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20">stopped working normally</a>. Â This was later <a href="http://news.cnet.com/8301-17938_105-10461881-1.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20">fixed</a>. There was speculation the error was due to incorrect leap year handling. It wouldn&#8217;t be the first time this occurred if this was indeed the reason.</p>
<p>In a software company where I used to work, there would usually be massive troubles every time some country went on or off daylight savings time, or any other time calculation hit a sensitive spot. I&#8217;m fairly sure that the world&#8217;s software systems, including government, finance, insurance, health care, suffer untold billions of damage every year due to the complexity of the system. Maybe we should simplify it.</p>
<p>I suggest having &#8220;years&#8221; with 365 x 4 + 1 = 1461 days instead of the usual year for starters. This would move the leap year problem ahead until year 2100, when the next special rule comes in. By that time, software engineering technology should have improved enough that this should no longer be an issue, I hope. If not, we can invent another system by then. Let&#8217;s also scrap all daylight savings time everywhere. It&#8217;s easy to do and the savings would be huge.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/gregorian-misery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tips for academics who develop software</title>
		<link>http://www.monomorphic.org/wordpress/advice-for-academics-who-develop-software/</link>
		<comments>http://www.monomorphic.org/wordpress/advice-for-academics-who-develop-software/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:44:14 +0000</pubDate>
		<dc:creator>johan</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[academic]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.monomorphic.org/wordpress/?p=533</guid>
		<description><![CDATA[Academics and practitioners, having rather different goals in life, tend to approach software development in quite different ways. No doubt there are many things each side of the fence can learn from the other, but I think academics in particular could often benefit quite a lot by adopting some of the practices used in industrial [...]]]></description>
			<content:encoded><![CDATA[<p>Academics and practitioners, having rather different goals in life, tend to approach software development in quite different ways. No doubt there are many things each side of the fence can learn from the other, but I think academics in particular could often benefit quite a lot by adopting some of the practices used in industrial development. And not just computer science academics!</p>
<p>A common misconception is that these techniques only are useful with large projects and large teams. I find, though, that they can help reduce much of the growth pains even in small projects, helping them reach maturity much faster.</p>
<p><strong>Use version control.</strong> Classical, but invalid, counter arguments include &#8220;it&#8217;s a hassle and too much work to set up&#8221;, or &#8220;there&#8217;s only one person working on this project anyway&#8221;. Even if it&#8217;s only you, you will benefit massively from being able to undo your changes far back in time. It will let you experiment safely. Plus, setup is no longer an issue with free and easy-to-use services like <a href="http://www.gitbub.com">github</a> and <a href="http://www.bitbucket.org">bitbucket</a>. My tool of choice is now Mercurial, and I used to use SVN. And there are many other good choices.</p>
<p><strong>Use a debugger.</strong> If there is a debugger available for your language, and there most certainly is, then you should use it to find nontrivial errors, rather than extensive printf style testing.</p>
<p><strong>Don&#8217;t optimise prematurely, but when you need to, use a profiler.</strong> Profilers tell you where a program&#8217;s performance bottlenecks are. You can profile things like heap usage (what classes use most space in Java, for instance) and CPU usage (which functions use the most CPU time). For Java, I&#8217;ve discovered that the NetBeans IDE has a very good built in profiler. Eclipse also has one, but it didn&#8217;t work on Mac last time I checked. For C/C++, GProf used to be good and probably still is.</p>
<p><strong>Use unit testing wisely.</strong> All of the above apply even to very small projects, but I think some projects are too small to need unit tests, at least initially. You be the judge. I find that unit tests can have a lot of benefit when applied to the fragile, complicated parts of a system, where many different things interlock. If you are ambitious you can also write tests first and code later &#8212; test driven development.</p>
<p><strong>Use a good IDE if you can.</strong> For a language like Java, where you have to type a lot of code to get something done and spread out your code across lots of files, a good IDE that can generate boilerplate code and navigate quickly can really speed up your work. It&#8217;s beneficial for other languages too. But I have no problem with people who use pure vim or emacs, after all these are practically IDEs.</p>
<p>I believe that honing your software development skills as an academic can pay off. Also see: Daniel Lemire on <a href="http://feedproxy.google.com/~r/daniel-lemire/atom/~3/yCTh62CVGi0/">why you should open source your projects</a>. (I will get around to doing this eventually, I promise <img src='http://www.monomorphic.org/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> )</p>
 <p><a href="http://www.monomorphic.org/wordpress/?flattrss_redirect&amp;id=533&amp;md5=14bb341f8788878c419453008dcc01a6" title="Flattr" target="_blank"><img src="http://www.monomorphic.org/wordpress/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.monomorphic.org/wordpress/advice-for-academics-who-develop-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

