<?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>Steve Vinoski's Blog &#187; languages</title>
	<atom:link href="http://steve.vinoski.net/blog/category/languages/feed/" rel="self" type="application/rss+xml" />
	<link>http://steve.vinoski.net/blog</link>
	<description>Ask forgiveness, not permission.</description>
	<lastBuildDate>Sat, 17 Jul 2010 18:01:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Joe Armstrong, Erlang, and RPC</title>
		<link>http://steve.vinoski.net/blog/2008/05/27/joe-armstrong-erlang-and-rpc/</link>
		<comments>http://steve.vinoski.net/blog/2008/05/27/joe-armstrong-erlang-and-rpc/#comments</comments>
		<pubDate>Tue, 27 May 2008 06:06:11 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[RPC]]></category>
		<category><![CDATA[distributed systems]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[distribution]]></category>

		<guid isPermaLink="false">http://steve.vinoski.net/blog/?p=72</guid>
		<description><![CDATA[Joe Armstrong explains the background of the distributed computing capabilities within Erlang. I find postings like Joe&#8217;s highly valuable. Few among us are language designers, so rarely do those of us who aren&#8217;t get a first-hand account from someone who is as to why and how something within a given language&#8217;s design came to be. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://armstrongonsoftware.blogspot.com/2008/05/road-we-didnt-go-down.html">Joe Armstrong explains the background of the distributed computing capabilities within Erlang</a>.</p>
<p>I find postings like Joe&#8217;s highly valuable. Few among us are language designers, so rarely do those of us who aren&#8217;t get a first-hand account from someone who is as to why and how something within a given language&#8217;s design came to be. Joe describes the distribution primitives that Erlang provides as well as their composability; it might seem simple, but anyone who&#8217;s written non-trivial distributed computing infrastructure knows that choosing the right primitives and making the right design trade-offs is anything but simple. This explains why I continue to be so impressed with the design choices and trade-offs Joe and crew made for Erlang &mdash; I&#8217;ve simply never seen any distributed computing infrastructure so elegant and yet so practical and capable.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.vinoski.net/blog/2008/05/27/joe-armstrong-erlang-and-rpc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thinking in Language, But Not Clearly</title>
		<link>http://steve.vinoski.net/blog/2008/05/09/thinking-in-language-but-not-clearly/</link>
		<comments>http://steve.vinoski.net/blog/2008/05/09/thinking-in-language-but-not-clearly/#comments</comments>
		<pubDate>Fri, 09 May 2008 23:04:03 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[commentary]]></category>
		<category><![CDATA[distributed systems]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[reliability]]></category>

		<guid isPermaLink="false">http://steve.vinoski.net/blog/?p=68</guid>
		<description><![CDATA[Ted Neward finally responds to my comments about his remarks concerning Erlang. I really don&#8217;t mean to pick on Ted &#8212; I like Ted! &#8212; but unfortunately, this time around his response misses the mark in more ways than one. First, Ted says: Erlang&#8217;s reliability model&#8211;that is, the spawn-a-thousand-processes model&#8211;is not unique to Erlang. In [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.tedneward.com/2008/05/09/Thinking+In+Language.aspx">Ted Neward finally responds</a> to <a href="/blog/2008/05/01/erlang-its-about-reliability/">my comments about his remarks concerning Erlang</a>. I really don&#8217;t mean to pick on Ted &mdash; I like Ted! &mdash; but unfortunately, this time around his response misses the mark in more ways than one.</p>
<p>First, Ted says:</p>
<blockquote><p><em>Erlang&#8217;s reliability model&#8211;that is, the spawn-a-thousand-processes model&#8211;is not unique to Erlang. In fact, it&#8217;s been the model for Unix programs and servers, most notably the Apache web server, for decades. When building a robust system under Unix, a master-slave model, in which a master process spawns (and monitors) n number of child processes to do the actual work, offers that same kind of reliability and robustness. If one of these processes fail (due to corrupted memory access, operating system fault, or what-have-you), the process can simply die and be replaced by a new child process.</em></p></blockquote>
<p>There&#8217;s really no comparison between the UNIX process model (which BTW I hold in very high regard) and Erlang&#8217;s approach to achieving high reliability. They are simply not at all the same, and there&#8217;s no way you can claim that UNIX &#8220;offers that same kind of reliability and robustness&#8221; as Erlang can. If it could, wouldn&#8217;t virtually every UNIX process be consistently yielding reliability of five nines or better?</p>
<p>Obviously, achieving high reliability requires at least two computers. On those systems, what part of the UNIX process model allows a process on one system to seamlessly fork child processes on another and monitor them over there? Yes, there are ways to do it, but would anyone claim they are as reliable and robust as Erlang&#8217;s approach? I sure wouldn&#8217;t. Also, UNIX pipes provide IPC for processes on the same host, but what about communicating with processes on other hosts? Yes, there are many, many ways to achieve that as well &mdash; after all, I&#8217;ve spent most of my career working on distributed computing systems, so I&#8217;m well aware of the myriad choices here &mdash; but that&#8217;s actually a problem in this case: too many choices, too many trade-offs, and far too many ways to get it wrong. Erlang can achieve high reliability in part because it solves these issues, and a whole bunch of other related issues such as live code upgrade/downgrade, extremely well.</p>
<p>Ted continues:</p>
<blockquote><p><em>There is no reason a VM (JVM, CLR, Parrot, etc) could not do this. In fact, here&#8217;s the kicker: it would be easier for a VM environment to do this, because VM&#8217;s, by their nature, seek to abstract away the details of the underlying platform that muddy up the picture.</em></p></blockquote>
<p>In your original posting, Ted, you criticized Erlang for having its own VM, yet here you say that a VM approach can yield the best solution for this problem. Aren&#8217;t you contradicting yourself?</p>
<blockquote><p><em>It would be relatively simple to take an Actors-based Java application, such as that currently being built in Scala, and move it away from a threads-based model and over to a process-based model (with the JVM constuction[sic]/teardown being handled entirely by underlying infrastructure) with little to no impact on the programming model.</em></p></blockquote>
<p>Would it really be &#8220;relatively simple?&#8221; Even if what you describe really were relatively simple, which I strongly doubt, there&#8217;s still no guarantee that the result would help applications get anywhere near the levels of reliability they can achieve using Erlang.</p>
<blockquote><p><em>As to Steve&#8217;s comment that the Erlang interpreter isn&#8217;t monitorable, I never said that&#8211;I said that Erlang was not monitorable using current IT operations monitoring tools. The JVM and CLR both have gone to great lengths to build infrastructure hooks that make it easy to keep an eye not only on what&#8217;s going on at the process level (&#8220;Is it up? Is it down?&#8221;) but also what&#8217;s going on inside the system (&#8220;How many requests have we processed in the last hour? How many of those were successful? How many database connections have been created?&#8221; and so on). Nothing says that Erlang&#8211;or any other system&#8211;can&#8217;t do that, but it requires the Erlang developer build that infrastructure him-or-herself, which usually means it&#8217;s either not going to get done, making life harder for the IT support staff, or else it gets done to a minimalist level, making life harder for the IT support staff.</em></p></blockquote>
<p>I know what you meant in your original posting, Ted, and my objection still stands. Are you saying here that all Java and .NET applications are by default network-monitoring-friendly, whereas Erlang applications are not? I seem to recall quite a bit of effort spent by various teams at my previous employer to make sure our distributed computing products, including the Java-based products and .NET-based products, played reasonably well with network monitoring systems, and I sure don&#8217;t recall any of it being automatic. Yes, it&#8217;s nice that the Java and CLR guys have made their infrastructure monitorable, but that doesn&#8217;t relieve developers of the need to put actual effort into tying their applications into the monitoring system in a way that provides useful information that makes sense. There is no magic here, and in my experience, even with all this support, it <em>still</em> doesn&#8217;t guarantee that monitoring support will be done to the degree that the IT support staff would like to see.</p>
<p>And do you honestly believe Erlang &mdash; conceived, designed, implemented, and maintained by a large well-established telecommunications company for use in highly-reliable telecommunications systems &mdash; would offer <em>nothing</em> in the way of tying into network monitoring systems? I guess SNMP, for example, doesn&#8217;t count anymore?</p>
<p>(Coincidentally, I recently had to tie some of the Erlang stuff I&#8217;m currently working on into a monitoring system which isn&#8217;t written in Erlang, and it took me maybe a quarter of a workday to integrate them. I&#8217;m absolutely certain it would have taken longer in Java.)</p>
<p>But here&#8217;s the part of Ted&#8217;s response that I really don&#8217;t understand:</p>
<blockquote><p><em>So given that an execution engine could easily adopt the model that gives Erlang its reliability, and that using Erlang means a lot more work to get the monitorability and manageability (which is a necessary side-effect requirement of accepting that failure happens), hopefully my reasons for saying that Erlang (or Ruby&#8217;s or any other native-implemented language) is a non-starter for me becomes more clear.</em></p></blockquote>
<p>Ted, first you state that an execution engine could (emphasis mine) &#8220;<em>easily</em> adopt the model that gives Erlang its reliability,&#8221; and then you say that it&#8217;s &#8220;a lot more work&#8221; for anyone to write an Erlang application that can be monitored and managed? Aren&#8217;t you getting those backwards? It should be obvious that in reality, writing a monitorable Erlang app is not hard at all, whereas building Erlang-level reliability into another VM would be a considerably complicated and time-consuming undertaking.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.vinoski.net/blog/2008/05/09/thinking-in-language-but-not-clearly/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>A Comment on &#8220;Multilanguage Programming&#8221;</title>
		<link>http://steve.vinoski.net/blog/2008/05/03/a-comment-on-multilanguage-programming/</link>
		<comments>http://steve.vinoski.net/blog/2008/05/03/a-comment-on-multilanguage-programming/#comments</comments>
		<pubDate>Sat, 03 May 2008 04:44:27 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[commentary]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[programming languages]]></category>

		<guid isPermaLink="false">http://steve.vinoski.net/blog/?p=67</guid>
		<description><![CDATA[A commenter named Nick left a thoughtful response to my post about my &#8220;Multilanguage Programming&#8221; column. Rather than respond to it with another comment, I thought I&#8217;d turn my response into a full posting, as I think Nick&#8217;s feedback is representative of how many people feel about the topic. Nick said: I would say that [...]]]></description>
			<content:encoded><![CDATA[<p>A commenter named Nick left a thoughtful response to my <a href="/blog/2008/04/30/multilingual-programming/">post</a> about my <a href="http://computer.org/portal/pages/dsonline/2008/06/w3tow.xml">&#8220;Multilanguage Programming&#8221; column</a>. Rather than respond to it with another comment, I thought I&#8217;d turn my response into a full posting, as I think Nick&#8217;s feedback is representative of how many people feel about the topic.</p>
<p>Nick said:</p>
<blockquote><p><em>I would say that instead of spending a lot of time on a conceptually different language it could be more beneficial to study, say, distributed algorithms or software/system architecture principles or your business domain. There is so much knowledge in this world that learning how to code the same thing in, roughly speaking, one more syntax seems like a waste of time. Even paying real attention to what is going on in the cloud computing can easily consume most of one’s spare time.</em></p></blockquote>
<p>I think there are assumptions here that are not necessarily true. Specifically, you&#8217;re not necessarily learning how to code the same thing in multiple languages; rather, the idea is that by choosing the best language for the task, coding is &#8220;just right&#8221; for the problem at hand. For example, I know from significant first-hand experience that if you want to write a set of distributed services that support replication, failover, and fault tolerance, the code you&#8217;d write to do that in C++ will be extremely different from the code you&#8217;d write in Erlang to achieve the same thing (well, actually, you&#8217;d be able to achieve far more in Erlang, in far fewer lines of code).</p>
<p>This is about much more than syntax. It&#8217;s about facilities, semantics, and trade-offs. If it were just syntax, then that would imply that all languages are equal in terms of expressiveness and capability, which we already know and accept to be untrue.</p>
<p>The cloud computing topic actually provides a good example of why knowing multiple languages can be useful. To use the <a href="http://code.google.com/appengine/">Google App Engine</a>, for example, you need to develop your applications in Python. What if you don&#8217;t know Python? Too bad for you.</p>
<blockquote><p><em>From a real life perspective, it takes years or working on nontrivial software to master a language. For example, some people still manage to have only a vague idea of util.concurent &mdash; and this is just a small enough (and well explained in the literature) part of Java. How realistic is it to expect that the majority of developers will be able to master multiple languages concurrently?</em></p></blockquote>
<p>I disagree that it takes years to master a language. One of the best OO developers I ever worked with was a mechanical engineer who taught himself programming. One of my current coworkers &mdash; a relatively young guy &mdash; started programming in Erlang only a few months ago, and he&#8217;s already writing some fairly sophisticated production-quality code. In 1988, I started using C++; by 1989, I was starting to help guys like <a href="http://www.pearsonhighered.com/educator/academic/product/0,3110,0201721481,00.html">Stan Lippman</a>, <a href="http://en.wikipedia.org/wiki/James_O._Coplien">Jim Coplien</a>, and others correct coding mistakes in their excellent books. I have a BSEE, no formal computer science training whatsoever, and am completely self-taught as far as programming languages go. (The only class I ever had in any computer language was a BASIC class I had to take in 1981.) Two other coworkers started with Python just a few months ago and they do quite well with it at this point. I can cite numerous such examples from throughout my career. I don&#8217;t think any of us are super-programmers or anything like that, so if we can do it, I don&#8217;t see why it would be a problem for anyone else.</p>
<p>Perhaps you&#8217;re falling trap to the &#8220;huge language&#8221; problem I mentioned in my column. It certainly can take some people many years to master enormous languages like Java and C++, but most languages are simply nowhere near that big.</p>
<blockquote><p><em>And who wants to maintain a code base written in widely different languages? Which most likely means multiple IDEs, unit testing frameworks, build systems (hey, not everyone is using even Maven yet), innumerable frameworks etc. And most of the interpreted languages among those are not even likely to run in the same VM. Not to mention the number of jobs asking for non-C++/Java skills.</em></p></blockquote>
<p>I use a number of languages daily and I really have no trouble maintaining the code regardless of which language any particular piece happens to be written in, or whether I wrote the code or one of my teammates did. Once you know a language, you know it; switching to it is no more difficult than using your one and only language if you&#8217;re a monolingual developer.</p>
<p>You also mention the &#8220;multiple IDE&#8221; problem. The first draft of my column contained some fairly direct language describing my dislike of IDEs, or more accurately, my dislike of the IDE culture, but <a href="http://g.oswego.edu/">Doug Lea</a> suggested I take it out, so I did. The problem is that some folks let the tool drive their solutions, rather than using the tool as a means to developing solutions. I&#8217;ve had numerous people tell me they won&#8217;t consider using a language unless their IDE fully supports it with Java- or Smalltalk-like refactoring. To me, that&#8217;s completely backwards. I&#8217;d rather use an <a href="http://www.gnu.org/software/emacs/">extensible editor</a> that can handle pretty much any language, thus letting me develop optimal solutions using the right languages, rather than having a mere editing tool severely limit my choice of possible solutions.</p>
<p>But <a href="http://osteele.com/archives/2004/11/ides">there are language mavens and there are tool mavens</a>, and they typically disagree. Follow that link and read, as the posting there is incredibly insightful. I am definitely a language maven; languages are my tools. I suspect, though, that Nick and others who raise similar questions to the ones quoted here lean more toward being tool mavens. I&#8217;m not passing judgment on either; I&#8217;m only pointing out the different camps to help pinpoint sources of disagreement.</p>
<p>As far as unit test frameworks, build systems, and frameworks go, I haven&#8217;t ever found any big issues in those areas when using multiple languages. The reason, not surprisingly, is that knowing multiple languages gives you multiple weapons for testing and integration. Ultimately, when you&#8217;re used to using multiple languages, you&#8217;re used to these kinds of issues and thus they don&#8217;t really present any formidable barriers.</p>
<p>And as far as jobs go, the best developers I&#8217;ve known throughout my career have been fluent in a number of programming languages, and each of them could work virtually wherever they wanted to. I don&#8217;t believe this correlation is mere coincidence.</p>
<blockquote><p><em>Curiously enough, this argumentation is hardly ever mentioned. Authors tend to assume that developers are lazy or have nothing else to learn.</em></p></blockquote>
<p>I don&#8217;t assume developers are lazy. Rather, I think our industry generally has a bad habit of continually seeking homogeneity in platforms, in languages, in tools, in frameworks, etc., and we really, really ought to know better by now. Once you learn to accept the fact that heterogeneity in computing is inevitable &mdash; since nothing can do it all, right? &mdash; you find yourself able to use that heterogeneity to your advantage, rather than continually battling against it and losing.</p>
<blockquote><p><em>Personally, I am planning to look at Scala and probably Erlang but even judging from the number of books on those it’s clear to me that they represent merely a niche market.</em></p></blockquote>
<p>Today&#8217;s niche market is tomorrow&#8217;s mainstream market. Regardless of whether either of those languages continues to grow, learning one or both will make you a better developer than you are today.</p>
<p>Consider the final question I ask in my column:</p>
<p><em><strong>After all, do any of us really believe we’ve already learned the last programming language we’ll ever need?</strong></em></p>
<p>I suspect the vast majority of developers would answer &#8220;no&#8221; to this question. Assuming that&#8217;s the case, then if you don&#8217;t regularly practice learning new languages, how do you know when you really need to start learning a new one, and how capable will you be of learning that next language when the need arises? The longer you stay with one language, the more isolated you become, typically without even realizing it. Shifting gears gets harder and harder. Then one day you look up and all the interesting work is elsewhere, out of your reach. Is that a position you want to put yourself in?</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.vinoski.net/blog/2008/05/03/a-comment-on-multilanguage-programming/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Multilingual Programming</title>
		<link>http://steve.vinoski.net/blog/2008/04/30/multilingual-programming/</link>
		<comments>http://steve.vinoski.net/blog/2008/04/30/multilingual-programming/#comments</comments>
		<pubDate>Thu, 01 May 2008 00:40:05 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[dynamic languages]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://steve.vinoski.net/blog/?p=65</guid>
		<description><![CDATA[Multilingual programming is one of my all-time favorite topics, and I feel very strongly that software developers should be adept at multiple programming languages. Developers need to be able to apply whatever language in their arsenal best suits the problem at hand, and perhaps even quickly learn a new language if what they already know [...]]]></description>
			<content:encoded><![CDATA[<p>Multilingual programming is one of my all-time favorite topics, and I feel very strongly that software developers should be adept at multiple programming languages. Developers need to be able to apply whatever language in their arsenal best suits the problem at hand, and perhaps even quickly learn a new language if what they already know doesn&#8217;t fit.</p>
<p>Too many developers seem to think that familiarity with one general-purpose language is good enough, but it isn&#8217;t. Knowing one language forces you to try to bend or change problems to fit whatever that language happens to be. That&#8217;s like trying to solve a problem by choosing a data structure or algorithm to use without ever considering the nature or details of the problem.</p>
<p>One of my favorite quotes on this topic is from <a href="http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html">Steve Yegge</a>:</p>
<blockquote><p><em>&#8230;an &#8220;X programmer&#8221;, for any value of X, is a weak player. You have to cross-train to be a decent athlete these days. Programmers need to be fluent in multiple languages with fundamentally different &#8220;character&#8221; before they can make truly informed design decisions.</em></p></blockquote>
<p>Yes indeed.</p>
<p>Too many developers also come up with weak excuses for not learning new programming languages, most of them being just different ways of saying, &#8220;But it&#8217;s different from the language I already know!&#8221; Don&#8217;t whine about the differences &mdash; instead, learn to appreciate them and take advantage of them.</p>
<p>I&#8217;ve hinted at the fact that I like this topic in previous issues of my <a href="/blog/internet-computing-columns/">Internet Computing column</a> when I covered the usefulness and applicability of languages such as <a href="http://dsonline.computer.org/portal/pages/dsonline/2006/06/w3tow.html">JavaScript and E4X</a>, <a href="http://dsonline.computer.org/portal/pages/dsonline/2006/08/w4tow.html">Ruby</a> (<a href="http://dsonline.computer.org/portal/pages/dsonline/2006/10/w5tow.html">twice</a>), and <a href="http://dsonline.computer.org/portal/pages/dsonline/2007/10/w5tow.html">Erlang</a> (also <a href="http://dsonline.computer.org/portal/pages/dsonline/2007/12/w6tow.html">twice</a>) for middleware and integration projects. My latest column, entitled <a href="http://steve.vinoski.net/pdf/IEEE-Multilingual_Programming.pdf">&#8220;Multilingual Programming&#8221;</a> (PDF), attempts to provide a few reasons why knowing and being able to apply multiple languages can be highly beneficial. As always, I welcome comments and feedback.</p>
<p><em>[Update: if you prefer not to read PDF, this column is now also <a href="http://computer.org/portal/pages/dsonline/2008/06/w3tow.xml">available online</a> in HTML.]</em></p>
]]></content:encoded>
			<wfw:commentRss>http://steve.vinoski.net/blog/2008/04/30/multilingual-programming/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
