<?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>Friendly patterns and algorithms &#187; coding</title>
	<atom:link href="http://www.palgorithm.co.uk/tag/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.palgorithm.co.uk</link>
	<description>Discussion of algorithms for games, graphics and general engineering</description>
	<lastBuildDate>Mon, 31 May 2010 11:21:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why isn&#8217;t Haskell popular in Industry?</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/</link>
		<comments>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/#comments</comments>
		<pubDate>Sun, 30 May 2010 19:04:43 +0000</pubDate>
		<dc:creator>Sam Martin</dc:creator>
				<category><![CDATA[haskell]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[embedding]]></category>

		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240</guid>
		<description><![CDATA[This question was recently posed (and closed!) on stackoverflow. The top voted reply is so good I thought I&#8217;d replicate it here! I&#8217;m afraid all I know of the original author is their &#8220;Orphi&#8221; posting name.
It&#8217;s tongue-in-cheek and broadly true, although I&#8217;d argue the details of a few points. I think it&#8217;s interesting that it [...]]]></description>
			<content:encoded><![CDATA[<p>This question was recently posed (and closed!) on <a href="http://stackoverflow.com/questions/2284875/why-is-haskell-used-so-little-in-the-industry/">stackoverflow</a>. The top voted reply is so good I thought I&#8217;d replicate it here! I&#8217;m afraid all I know of the original author is their &#8220;Orphi&#8221; posting name.</p>
<p>It&#8217;s tongue-in-cheek and broadly true, although I&#8217;d argue the details of a few points. I think it&#8217;s interesting that it doesn&#8217;t contain the main reason blocking me from using it on a daily basis. More on that in a moment.</p>
<p>First, here&#8217;s Orphi&#8217;s response:</p>
<blockquote>
<ol>
<li><strong>Nobody&#8217;s ever heard of it.</strong> No one&#8217;s going to use something they don&#8217;t know exists.</li>
<li><strong>It&#8217;s unpopular.</strong> People assume that the most popular language is the best language, because if it wasn&#8217;t good, it wouldn&#8217;t be popular. This is actually untrue; as you can see, the most popular language is the most popular language. To put it another way, Haskell is unpopular because it&#8217;s unpopular. This is what Haskell programmers refer to as &#8220;recursion&#8221;, and despite what imperative  programmers tell you, it&#8217;s extremely common in The Real World.</li>
<li><strong>It&#8217;s different.</strong> People are always afraid of what&#8217;s different.</li>
<li><strong>It&#8217;s difficult.</strong> People think that Haskell is difficult to understand or difficult to learn. This is almost certainly related to point #3. It&#8217;s also related to the fact that the Haskell community is populated by people who casually remark &#8220;a monad is just a monoid in the category of endofunctors, what&#8217;s the problem?&#8221; and expect normal human beings to comprehend this.</li>
<li><strong>It&#8217;s risky.</strong> Most companies don&#8217;t want to be the first to use something. Haskell isn&#8217;t being used by many people, so not many people want to try it. (See this recursive unpopularity argument again?)</li>
<li><strong>Can&#8217;t hire programmers.</strong> First, by #2, there aren&#8217;t many programmers who already know Haskell. Second, most people  believe #4, which means you can&#8217;t train programmers to use Haskell. (At least, it would if it were actually true.) A language that you can&#8217;t hire programmers for is a very, very risky proposition indeed. (Which leads us back to #5.)</li>
<li><strong>Libraries.</strong> This is probably the big one, so I&#8217;m going to spend some time on it.
<ul>
<li><strong>Quality.</strong> We have the quantity. We do not yet have the quality. Most of Hackage is one-man hobby projects with little to no documentation. Some of it is incomplete, some of it has long since bit-rotted, some of it malfunctions if used in certain ways.</li>
<li><strong>The Outside World.</strong> If you want a binary heap tree, Hackage probably provides a dozen implementations. If you want to  connect to an RPC server and fire off a few procedure calls&#8230; good luck with that. Same deal for talking to databases, accessing OS resources, manipulating binary file formats&#8230; You&#8217;ll basically have to write  everything yourself from scratch. This is a <em>big deal</em> for commercial work.</li>
<li><strong>Multiple incompatible libraries.</strong> You <em>can</em>, in fact, connect to a database in Haskell. Trouble is, at the last count there&#8217;s about a dozen libraries for doing this, and it&#8217;s bewildering trying to figure out which ones are actively supported and which ones are zombie projects that stopped working years ago. It&#8217;s also not as simple as hooking up an ODBC connection; there are different backends for each library and each DB target. Yay. :-/</li>
<li><strong>Windows.</strong> Almost all the important libraries (for cryptography, binary file formats, network protocols, data compression, talking to databases, etc.) are Haskell wrappers around C libraries. And these all fail to build on Windows. Given that Windows is<br />
the single biggest target platform on the market, this is a <em>big deal</em>.</li>
</ul>
</li>
<li><strong>Unpredictable performance.</strong> This is way, way down at #8. Most people don&#8217;t know enough about Haskell to even know this. Most people just assume that &#8220;Haskell is slow&#8221;. This is demonstrably untrue. What <em>is</em> true is that it can be hard to predict the performance of a Haskell program. Subtle, apparently irrelevant changes  can sometimes make big performance differences.</li>
<li><strong>Correctness.</strong> Most companies don&#8217;t give a <em>****</em> about correctness. They don&#8217;t care about quality. They just want to shovel code out the door as fast as possible and earn wads of cash. If there are bugs, they&#8217;ll charge the customer money to fix them. Getting code right is of no interest; getting code fast is what counts. Haskell is a language that rewards those who sit back and deeply analyse the problem, and then produce a beautiful solution. Most companies don&#8217;t care for this approach; let&#8217;s just hack something together as fast as possible, and worry about fixing it later (i.e., never).</li>
</ol>
<p>There <em>are</em> a few places where correctness matters. These are either safety-critical systems, or financial systems, generally. I gather Haskell tends to be quite popular here.</p>
<p>One final pair of data points:</p>
<ul>
<li>I can still remember not so long ago hearing people cry &#8220;C++ is a  toy language for n00bs! You should use a <em>proper</em> programming language like C.&#8221; Now take a look around you and see how many large-scale C++ programs there are.</li>
<li>People have been claiming that Lisp is &#8220;the next big thing&#8221; for,  what, 40 years now? Lisp is older than almost every programming language in mainstream use. And now many large-scale Lisp programs are there?</li>
</ul>
<p>Which fate awaits Haskell, I don&#8217;t know. I rather suspect all the good ideas of Haskell will be stolen by the likes of C# and hybrids like F# or OCaml,and people <em>still</em> won&#8217;t ever use Haskell itself.  It&#8217;s just too different.</p>
<p>But anyway, as to why <em>industry</em> doesn&#8217;t use Haskell, see the points above. It&#8217;s too rare, too unpopular, too weird, and has incomplete libraries. That&#8217;s basically it, in a nutshell.</p></blockquote>
<h2>Embedding Haskell?</h2>
<p>The missing item for me is how hard it is to embed. For my purposes, I need to embed Haskell within an existing C++ framework, not dissimilar to how you might embed Lua. I need to do so in a compiler agnostic manner, where I retain control over how the embedding occurs (i.e. compilation and linking) and have significant influence over the operation of the runtime. In short, Haskell must fit in to my existing C++ environment, not the other way round.</p>
<p>An interesting aspect of an &#8220;Embedded Haskell&#8221; would be you could remove most (if not all) of Haskell&#8217;s IO support if it made the job of embedding Haskell significantly easier. The ability to efficiently embed &#8216;pure&#8217; Haskell would be a very interesting and useful tool in it&#8217;s own right <sup>1</sup>. It&#8217;s a simple idea, and therefore doesn&#8217;t take many words to state, but I&#8217;m keen to not understate how significant this could be.</p>
<h2>Incremental adoption</h2>
<p>Playing the counter argument, it could be argued that my needs are rather domain specific and an Embedded Haskell is not likely to be important enough to aid mainstream adoption of Haskell. This attitude does appear to be reflected in some parts of the Haskell community.</p>
<p>To start anecdotally, when I hear people propose writing something in Haskell, they generally imply the only option on the table is to write it in Haskell <em>wholesale</em>. Most arguments about use of Haskell I have read online focus on this either-or situation. For nearly all the reasons made in the quote above, this polarised position doesn&#8217;t appeal unless you have very tailored circumstances and considerable resources.</p>
<p>There is also evidence of a lack of emphasis at a more fundamental level. GHC and the tools and libraries ecosystem that surround it are not designed with embedding as a goal. GHC is primarily focused on producing stand alone executables, which it does very well. Interoperability tools like <a href="http://www.haskell.org/greencard">Greencard</a> immediately sideline the ability to call Haskell from C as having <a href="http://www.haskell.org/greencard/downloads/greencard-latest/goals.html">&#8220;little demand&#8221;</a>. Most emphasis is placed on wrapping C libraries for use in Haskell. The best I can find online are some open student projects such as the ageing <a href="http://hackage.haskell.org/trac/summer-of-code/ticket/1555">GSoC ticket #1555</a>, or the <a href="http://www.cse.unsw.edu.au/~pls/thesis-topics/embeddedhaskell.html">Embedded Haskell</a> thesis topic in the <a href="http://www.cse.unsw.edu.au/~pls">PLS group</a>. I believe this situation might be starting to change though, as the desire to <a href="http://blog.well-typed.com/2010/04/parallel-haskell-2-year-project-to-push-real-world-use/">remove the implementation obstacles</a> surrounding much of Haskell&#8217;s inspiring research builds, and new developments such as the <a href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM">LLVM backend</a> present additional options.</p>
<p>Wholesale adoption of Haskell is undeniably risky and definitely not the only way. Incremental adoption is where it&#8217;s at, and in a nutshell, that&#8217;s what Haskell is currently missing the most.</p>
<ol class="footnotes"><li id="footnote_0_240" class="footnote">As an interesting historical aside, when Haskell first took up its purity banner, monadic IO did not exist and Haskell programs were pure functions of type [Response] -&gt; [Request], where these types provided a limited set of options such as ReadFile, WriteFile, RequestFailed, ReadSucceeded for the side-effecting wrapper program to interpret. (See the <a href="http://research.microsoft.com/en-us/um/people/simonpj/papers/marktoberdorf/">Awkward Squad tutorial</a> for further details.) Generalise this to a pure iteratee and you are probably in the right ballpark.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Haskell For Games!</title>
		<link>http://www.palgorithm.co.uk/2009/08/haskell-for-games/</link>
		<comments>http://www.palgorithm.co.uk/2009/08/haskell-for-games/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 13:14:53 +0000</pubDate>
		<dc:creator>Sam Martin</dc:creator>
				<category><![CDATA[haskell]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[multi-core]]></category>

		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=195</guid>
		<description><![CDATA[I&#8217;ve been head-down in a big stack of papers since around March this year. That was the point at which I first started to get excited about the idea of Haskell becoming a plausible language for use in games development. More recently I decided to start doing something about it and gave a talk to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been head-down in a big stack of papers since around March this year. That was the point at which I first started to get excited about the idea of <a title="Haskell homepage" href="http://www.haskell.org/" target="_blank">Haskell</a> becoming a plausible language for use in games development. More recently I decided to start doing something about it and gave a talk to a group of dedicated Haskellers at <a title="AngloHaskell 2009" href="http://www.haskell.org/haskellwiki/AngloHaskell/2009" target="_blank">AngloHaskell 2009</a>. The event turned out to be a lot of fun and I think it&#8217;s safe to say the talk went pretty well. Here&#8217;s the abstract.</p>
<blockquote><p><strong>Functional Languages in Games: Plotting the Coup</strong></p>
<p><a href="http://www.palgorithm.co.uk/wp-content/uploads/2009/08/functional-languages-in-games-development.pdf">[Slides as PDF]</a></p>
<p>As a games developer by trade, my experience of the industry leads me to suspect games development is approaching a tipping point where functional languages could enact a successful coup. The revolution would claim a chunk of C++-owned territory for the victor and mark an important milestone in the development of functional languages. It will not be easy. Games development is notoriously demanding and the successful functional language would need to meet stringent performance requirements, have clearly demonstrable &#8216;killer apps&#8217;, jump through hoops of fire and tell jokes at parties. This talk will discuss how close Haskell is to meeting these demands, the challenges that remain, evidence of functional languages already in games, and how Haskell compares against its nearest competitors.</p></blockquote>
<p><strong>Haskell For Games!</strong></p>
<p>At first glance it sounds like a crazy idea. One to file away with the other crazy ideas to replace C++ with Java/C#/Python/etc. Most alternatives to C++ are so unlikely to succeed in practice that they appear to taint the very idea of replacing C++. I&#8217;ve written before about my high regard for C++,  but as powerful and effective as it is for games development, it does not represent an impossible challenge and we don&#8217;t have to look to replace it entirely. Finding it a suitable companion would be a major step forward and is the goal I&#8217;d choose to focus on.</p>
<p><strong>Multi-core</strong></p>
<p>There are powerful currents moving in modern computer hardware, pulling us inevitably into murky multi-core waters. However this movement also begins to make the idea of doing games development in an alternative language more plausible. What do we do when large multi-core systems become a standard hardware platform? (A reality that I note is only a handful of years away.) I have yet to see a parallelisation option that don&#8217;t make me think life in this new age in C++ will be rather hard. And would it be any easier in C# or Java? No. Multi-core life there will likely be just as tough. However, these aren&#8217;t the only options.</p>
<p><strong>Functional languages</strong></p>
<p>I&#8217;m far from the first to notice this, but pure functional languages &#8211; as opposed to the imperative languages most of us are used to &#8211; do at least have a theoretical advantage. Pure functional code does not have side effects. If you call it with the same parameters you will always get the same answer. It is thread-safe at a fundamental level giving opportunities for optimisation and parallel evaluation that are either infeasible or impossible with imperative code. They aren&#8217;t so alien as you may immediately think. You may well already work with such a language without really realising it. Ignoring some syntactical obfuscations, both CG and HLSL are essentially pure, referentially transparent languages. Neither language can wipe your hardrive or save state in global variables, and it&#8217;s no coincidence that they both optimise exceptionally well.</p>
<p>As you can well imagine, this is not an open-and-shut success case. Achieving good parallelism, even from a functional starting point, is still hard. In the previous example of CG/HLSL, the hard parallelism work is still done by the programmer by setting up the GPU pipeline, rather than magically derived from the CG/HLSL. Doing complicated, dependent operations in a GPU architecture is tricky and the subject of many GPGPU articles, although to be fair many of these obstacles are due to the current GPU architecture than the more fundamental issues in utilising parallelism.</p>
<p>Achieving parallel code that includes grubby details like nesting and runtime data dependencies are hard problems. But in the long term I think it&#8217;s more plausible to turn these problems into successes in functional languages than anywhere else. Compiler-parallelised code, even if partly programmer controlled, would be a Killer App for any alternative language, and one feature that C++ is unlikely to ever have. Without this feature, there are many other benefits for games development to adopt a functional sister-language, but the cost of doing so may cancel out the cost of the adoption.</p>
<p><strong>Multi-core Haskell</strong></p>
<p>I&#8217;m championing Haskell from the functional language pack for a variety of reasons, several of which are noted briefly in my talk and the rest I&#8217;ll expand on further in the future. I hope many of the benefits of Haskell will be apparent to anyone prepared to spend the time learning it, and I&#8217;d urge anyone interested to get stuck in immediately. There are several decent tutorials referenced from the <a href="http://www.haskell.org/haskellwiki/Learning_Haskell">Haskell Wiki</a>, and I can highly recommend, <a href="http://learnyouahaskell.com/">&#8220;Learn You A Haskell For Great Good!&#8221;</a>, as a great starting point. One other very notable highlight is the on-going research into extending the language to support <a href="http://research.microsoft.com/en-us/um/people/simonpj/papers/ndp/fsttcs2008.pdf" target="_blank">Nested Data Parallelism</a>. Although not complete, this research does look very promising and where I&#8217;m hoping some of the magic may take place.</p>
<p>Haskell for Games is by no means a done deal, but my enthusiasm for this project has at least withstood it&#8217;s first challenge &#8211; presenting these ideas to members of the Haskell community &#8211; and if anything has grown as a result.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.palgorithm.co.uk/2009/08/haskell-for-games/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The beauty of software development</title>
		<link>http://www.palgorithm.co.uk/2009/05/the-beauty-of-software-development/</link>
		<comments>http://www.palgorithm.co.uk/2009/05/the-beauty-of-software-development/#comments</comments>
		<pubDate>Wed, 27 May 2009 19:05:33 +0000</pubDate>
		<dc:creator>Sam Martin</dc:creator>
				<category><![CDATA[thoughts]]></category>
		<category><![CDATA[beauty]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://www.palgorithm.co.uk/2009/05/the-beauty-of-software-development/</guid>
		<description><![CDATA[This is all about how amazing software development really is.
Taking &#8220;X&#8221; to be a geeky subject: The belief that &#8220;X&#8221; is truly a thing of beauty but scorned, unloved and misunderstood by the masses is by no means a modern concept. But it lingers on all the same. I suppose it&#8217;s no coincidence that the [...]]]></description>
			<content:encoded><![CDATA[<p>This is all about how amazing <b>software development </b>really is.</p>
<p>Taking &#8220;X&#8221; to be a geeky subject: The belief that &#8220;X&#8221; is truly a thing of beauty but scorned, unloved and misunderstood by the masses is by no means a modern concept. But it lingers on all the same. I suppose it&#8217;s no coincidence that the culmination of many geeky subjects into a sort of geeky mega-subject (software development) might attract a bit more than it&#8217;s fair share of abuse. People at least have some <i>respect </i>for mathematicians and physicists, even if they choose to distance themselves. Tell people you develop software for a living and they promptly fall asleep, or complain that their computer never works. Unless of course, you develop <i>games </i>for a living at which point you become every kid&#8217;s best friend. (It&#8217;s a strategy I highly recommend.)</p>
<p>Here&#8217;s a few thoughts and some of my favourite quotes on the topic of beauty and software. </p>
<p><b>Art</b><br />First up is <a target="_blank" href="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth&#8217;s</a>, <a target="_blank" href="http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming">&#8220;Art of computer programming&#8221;</a>. For non-coders out there, this book is the equivalent of Steven Hawkings, &#8220;Brief History of Time&#8221;, to most people: Everyone has heard of it. Many people own a copy. Some people have even attempted to read it but few have actually completed it and even less understood it. It&#8217;s the kind of &#8220;compulsory reading&#8221; that most programmers skip but know they probably shouldn&#8217;t have.</p>
<p>Knuth justifies his use of the word &#8220;Art&#8221; in the title:<br />
<blockquote>Computer programming is an art, because it applies accumulated knowledge to the world, because it requires skill and ingenuity, and especially because it produces objects of beauty. A programmer who subconsciously views himself as an artist will enjoy what he does and will do it better.</p></blockquote>
<p>You can almost hear a revolt starting.</p>
<p>Is coding Art? Well, I think there&#8217;s one thing missing in Knuth&#8217;s description that would make his assertion particularly convincing &#8211; Art can tell you something about humanity. Can your code do that? Well, I&#8217;m not sure. But, in the defense of code and the study of patterns in general, there are features and patterns of the world that are better reflected through them than Art. I think some of these patterns are surprisingly deep and beautiful &#8211; eigenvectors are the first to spring to mind. Certainly beautiful enough that I&#8217;d hang them on my wall if I could capture them in a picture.</p>
<p><b>Expression</b><br />You can express yourself through Art. Can you express yourself through code? Certainly. The most obvious example of this is the rapidly growing cross-over world of programming visual artists. Generative art is a topic all of it&#8217;s own, so I&#8217;ll just recommend anyone interested to check out <a target="_blank" href="http://processing.org/">Processing</a> and follow links from there. I&#8217;m a fan of <a target="_blank" href="http://www.flight404.com">Robert Hodgin</a>, especially <a target="_blank" href="http://vimeo.com/935317?pg=embed&amp;sec=">this</a>.</p>
<p>Is it possible to be defined by your creations, as many artists become defined by their output? This seems to be true of <a target="_blank" href="http://www.1014.org/">Justin Frankel</a>, creator of several popular and <a target="_blank" href="http://en.wikipedia.org/wiki/Justin_Frankel">sometimes controversial</a> projects. There&#8217;s a popular quote to go with his resignation from AOL to go with this, but please be aware I&#8217;m including it with some reservations as it&#8217;s second hand and comes from a somewhat <a target="_blank" href="http://www.slate.com/id/2109615/">opinionated article</a>. Just be aware it might be porky pies:<br />
<blockquote>For me, coding is a form of self-expression. The company controls the most effective means of self-expression I have. This is unacceptable to me as an individual, therefore I must leave.</p></blockquote>
<p>(I should probably also note his most recent project, <a target="_blank" href="http://www.reaper.fm/">REAPER</a>, is absolutely fantastic and all you Cubase users should jump ship immediately.)</p>
<p><b>Elegance</b><br />I might be nitpicking, but I suspect the most common understanding of &#8216;beauty&#8217; in reference to code is actually something closer to &#8216;elegance&#8217; rather than beauty as such. Code elegance is arguably the reading-between-the-lines topic of many software engineering mailing lists. </p>
<p>Some noteworth texts from the small to the large include a decent blog post, <a target="_blank" href="http://avdi.org/devblog/2008/04/27/on-beauty-in-code/">On Beauty in Code</a>; a presentation on how to go about <a target="_blank" href="http://laurat.blogs.com/talks/write_beautiful_code.pdf">writing beautiful code</a> (in PHP of all things!); and of course there&#8217;s a rather interesting looking book, <a target="_blank" href="http://books.google.co.uk/books?id=gJrmszNHQV4C&amp;dq=Beautiful+Code&amp;printsec=frontcover&amp;source=bn&amp;hl=en&amp;ei=H0EdStb4I4eRjAfxvbmSDQ&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=4#PPP1,M1">Beautiful Code</a>. I haven&#8217;t read this yet, but intend to shortly. The highlight for me is an interesting review of a review of the book entitled, <a target="_blank" href="http://www.codinghorror.com/blog/archives/001062.html">Code isn&#8217;t beautiful</a>:<br />
<blockquote>Ideas are beautiful. Algorithms are beautiful. Well executed ideas and algorithms are even more beautiful. But the code itself is not beautiful. <b>The beauty of code lies in the architecture, the ideas, the grander algorithms and strategies that code <i>represents</i>.</b></p></blockquote>
<p>I think that&#8217;s pretty much on the button.</p>
<p><b>Architecture</b><br />If your code was a building &#8211; an analogy that happens to be a good fit a lot of the time &#8211; you could marvel at it&#8217;s architecture. You could be impressed by the construction, or the balance of functionality and aesthetics. And like appreciation of architecture, a lot can be in the eye of the beholder! </p>
<p><b>Coventry&#8217;s Belgade Theatre.</b><br /><img alt="" title="" style="max-width: 800px;" src="http://www.e-architect.co.uk/birmingham/jpgs/belgrade_theatre_stantonwilliams250408_1.jpg" height="" width="495" /><br />Is it a <a target="_blank" href="http://www.e-architect.co.uk/birmingham/belgrade_theatre_coventry.htm">&#8220;bold and dynamic&#8221;</a> statement, developed through a <a target="_blank" href="http://www.e-architect.co.uk/birmingham/belgrade_theatre_coventry.htm">&#8220;sculpural process&#8221;</a> where <a target="_blank" href="http://www.e-architect.co.uk/birmingham/belgrade_theatre_coventry.htm">&#8220;the spaces that it embraces, and that it implies around itself, are as important as the form itself&#8221;</a>? Or, an unimaginative concrete cube ungracefully slapped into the middle of an already concrete-heavy town, representing little but the staggering lack of inspiration present in its creators? You decide! Comparisons with your most loved or love-to-hate software engineering projects as comments please.</p>
<p><b>Creation</b><br />Ignoring the code and algorithms for a moment, it&#8217;s undeniable that the output of code can be beautiful &#8211; after all it&#8217;s a major goal of computer graphics research. And not all of it involves artists in the traditional sense. Data visualisation has become a big topic in recent years. I find the growth of this area quite fascinating as it produces attractive, often intriguing images but apparently skipping over the role of an artist in a traditional sense and deriving input purely from real world data. It&#8217;s arguably an expression of humanity &#8211; although not quite in the same sense I originally had in mind!</p>
<p>On a personal note, I still remember the first implementation of our radiosity algorithm emerge. The whole thing happened quite quickly and we lost several days to just playing with it: tweaking the scene, changing the lights, adding some post processing. It was something none of us had seen before, and it took us quite by surprise. I&#8217;d had that feel-good effect from previous projects, but there&#8217;s something about actually being able to see the result and play with it that makes it all the more tangible.</p>
<p><b>Process<br /></b>I clearly remember my tutor at university complaining that too many people focus on <i>process </i>over <i>product</i>. In fact, he was my <i>music </i>tutor complaining about composers, but the point applies very well to software engineering. But that&#8217;s not to say there isn&#8217;t beauty &#8211; even joy &#8211; to gain from the creation of code. This leads me to my last, but perhaps favourite quote of all time. Here&#8217;s Alexander Stepanov (author of the C++ standard library) and Mat Marcus in some <a target="_blank" href="http://www.stepanovpapers.com/">lecture notes</a>: <br />
<blockquote>Programming has become a disreputable, lowly activity. More and more programmers try to become managers, product managers, architects, evangelists – anything but writing code. It is possible now to find a professor of Computer Science who never wrote a program. And it is almost impossible to find a professor who actually writes code that is used by anyone: the task of writing code is delegated to graduate students. Programming is wonderful. The best job in the world is to be a computer programmer. Code can be as beautiful as the periodic table or Bach’s Well Tempered Clavier.</p></blockquote>
<p>It&#8217;s one of my favourite quotes because it&#8217;s so passionate: I too love programming! I love patterns and algorithms! The world is fantastic!</p>
<p>But &#8211; and it&#8217;s a big but &#8211; that quote simulateously shines light on the big elephant in the room: Software development is programming <b>but with people</b>. That &#8216;people&#8217; part is vitally important, and is occasionally neglected by programmers of code, beautiful or otherwise. It mustn&#8217;t be. Coding is empowering, but the power still lies with people. I suspect software development does have a thing or two to tell us about humanity.</p>
<p>And that&#8217;s why software development really is amazing. Even if it&#8217;s simultaneous one of the most mind-numbingly difficult, painful and exhilarating things I can think of.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.palgorithm.co.uk/2009/05/the-beauty-of-software-development/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
