<?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>My life is virtual... DOT COM &#187; programming-languages</title>
	<atom:link href="http://my.life-is-virtual.com/tag/programming-languages/feed/" rel="self" type="application/rss+xml" />
	<link>http://my.life-is-virtual.com</link>
	<description></description>
	<lastBuildDate>Sun, 06 Mar 2011 06:32:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>So&#8230; Where Do I Begin?</title>
		<link>http://my.life-is-virtual.com/2009/01/27/so-where-do-i-begin/</link>
		<comments>http://my.life-is-virtual.com/2009/01/27/so-where-do-i-begin/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 05:36:50 +0000</pubDate>
		<dc:creator>jcooper</dc:creator>
				<category><![CDATA[Vaguely Instructional]]></category>
		<category><![CDATA[20/20 hindsight]]></category>
		<category><![CDATA[newbie]]></category>
		<category><![CDATA[programming-languages]]></category>

		<guid isPermaLink="false">http://my.life-is-virtual.com/?p=53</guid>
		<description><![CDATA[Previously I made the claim that learning a language affects how you think. Here&#8217;s my take on what you might want to try, if you are thinking about picking up programming. This article, while designed for someone who hasn&#8217;t yet &#8230;<p class="read-more"><a href="http://my.life-is-virtual.com/2009/01/27/so-where-do-i-begin/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><span class='summary'><a href='http://my.life-is-virtual.com/2009/01/21/you-can-write-cobol-in-any-language/'>Previously</a> I made the claim that learning a language affects how you think. Here&#8217;s my take on what you might want to try, if you are thinking about picking up programming.</span></p>
<p><span class='summary'>This article, while designed for someone who hasn&#8217;t yet started programming, must needs contain some technical terminology. I originally considered littering the text with footnotes, but who likes reading footnotes? (Unless they&#8217;re written by Dave Barry, of course!) Instead, read <a href='http://my.life-is-virtual.com/2009/01/27/programmer-vocab-crash-course/'>this glossary thingy</a> first, which should serve a as a mild introduction to some basic &#8220;lingo.&#8221; </span></p>
<p>This is obviously going to be for a very specialized audience&#8211;the intersection of the set of people who read my blog and the set of people who aren&#8217;t programmers but could see themselves maybe becoming one someday. Hopefully it will be at least mildly interesting to those of us who don&#8217;t belong to the empty set :)</p>
<p>My reasoning behind my suggestions is based on equipping you not only with a tool that will help you accomplish some task, but that will stimulate you intellectually and help you think about programming. It will also hopefully provide a solid foundation that you can build upon so that you will find it easier to program in future languages you may learn (perhaps ones that <span class='italic'>are</span> more task-oriented).</p>
<p>As such, I will start with some I think you should not learn as your first language, and why. Obviously, I&#8217;m not saying you should never learn these (quite the opposite in the case of some); just that they <span class='bold'>maybe shouldn&#8217;t come first</span>.</p>
<ul>
<li><span class='bold'>C</span> &#8211; An excellent language, and incredibly useful (still today one of the most-used languages in spite of its simplicity). It also has a small syntax and standard library, making learning it on a superficial level quite easy. However, based on the criteria I mentioned above, I cannot recommend it as a first language. It lacks too many helpful abstractions, and indeed tends to force you into pretty specific coding styles. This is a pity, because I&#8217;d really love to recommend it on the virtue of what it teaches you about how many other programming languages work &#8220;under the hood.&#8221; Learn it second!</li>
<li><span class='bold'>C++</span> &#8211; Built off C, C++ had the aim to deal with the aforementioned lack of abstraction&#8211;in other words, just as you don&#8217;t need to know how a car works to drive one, you shouldn&#8217;t necessarily have to know how a computer works to write programs for it&#8211;but still be compatible with C code. It became quite popular in its day, and indeed there is still an enormous amount of programs written in C++ around. However, while I applaud its goals, its execution is lacking. It&#8217;s ridiculously complicated in about every way you can think of, and when you combine that with the lack of any training wheels or even safety belt (a wrong move can crash your program or corrupt data, and often it is unable to tell you why)&#8230; you&#8217;re asking for trouble. There are certainly C++ zealots around, but I&#8217;m just as certainly <a href='http://yosefk.com/c++fqa/index.html'>not the only one</a> who thinks that learning it well is not worth the titanic time investment.</li>
<li><span class='bold'>Java</span> &#8211; Many people will disagree with my putting Java on the not-learn-first list; indeed it&#8217;s the one they teach you first at BYU and lots of other schools (although only ones striving to be &#8220;practical&#8221;&#8211;Computer Science programs that take a more academic approach tend to use other example languages). Java came along as an answer to the madness that was/is C++, and became <span class='bold'>very</span> popular in the business world. I reckon it&#8217;s still the Biggun&#8217;. One of its most interesting features is that it is <span class='italic'>cross-platform</span>&#8211;that is, your program will run on Windows, Mac OS X, Linux, etc. (This is not a typical thing!)
<p>I say don&#8217;t learn Java first, because quite frankly of the Java-like languages it&#8217;s not the best. It lacks some features and is quite verbose; you end up writing a lot of boiler-plate code all the time. I can also say that from personal experience, if you learn it first, it makes you think &#8220;in Java.&#8221; And in hindsight, that&#8217;s not how I want to think :)</li>
<li><span class='bold'>Javascript and PHP</span> &#8211; Two good languages, and ones you more-likely-than-not will learn eventually. I don&#8217;t recommend them as first languages for a couple reasons. For one thing, they are very loosely typed&#8211;this means they are very willing to &#8220;try and guess what you meant.&#8221; This is a pro as well as a con, but I think you will appreciate it more&#8211;and it will bite you in the butt less&#8211;when you have some experience under your belt and you actually understand what &#8220;loosely typed&#8221; means and how it applies to code you write. Another reason to steer clear of them is that they are almost the trademark &#8220;newbie languages.&#8221; This has a number of implications:
<ul>
<li>No real community to speak of. Most of the people who program in them do so not out of a love for the language, but out of desire to get something done quick. The &#8220;community&#8221; is a lot of people who would be new like you&#8211;and when you&#8217;re new to a language, I&#8217;ve found it&#8217;s helpful to know where to find experienced people. </li>
<li>Lots of code for these languages that&#8217;s out there on the internet&#8211;both example code and libraries (that is, code that others have written to perform a task so you don&#8217;t have to write it) are written by people new like you. Again, as a newbie programmer, you want to learn from and use code that is as close to professional quality as possible. </li>
<li>Security gotchas. Though this kind of thing does of course get better as time goes on, rapscallions are well aware that code in these languages is both very popular and often written naively. Thus if there are vulnerabilities, they are going to be found out and exploited. </li>
<li>General lack of emphasis on proper coding style, algorithms, etc. As very permissive languages, they permit you to write steaming piles of&#8230; code.</li>
</ul>
</li>
<li><span class='bold'>Perl</span> &#8211; I have a soft spot for Perl, but as one of the most organic languages out there, it has become a bit overgrown with decade-old weeds. Additionally, it has a lot of subtlety and complexity, and lots of syntax. Unlike C++, it can&#8217;t wreak havoc on your whole system, but I have accidentally erased files before by getting the file-opening syntax wrong. (I know that came off as anecdotal FUD, but I was merely listing an example. Again, I like the language, in spite of its quirks.)
<p>Perl has a dedicated and experienced community behind it, that I&#8217;ve found to be helpful and excellent. It&#8217;s also got probably the largest collection of freely-available libraries of any language out there. But in reality, I wouldn&#8217;t recommend it as a first language, and even as a second language I&#8217;d recommend waiting for its next incarnation to come out (which has been in the works for many years now. The language&#8217;s designer recognized that Perl needed a complete rewrite, and so it&#8217;s taking awhile).</li>
<li><span class='bold'>Visual Basic</span> &#8211; If we were speaking of &#8220;classic ASP&#8221; or Visual Basic 6, all of the above commentary would apply, and then some. Nowadays, however, you&#8217;d be more likely to encounter VB.NET, which is built on the .NET framework and (though I&#8217;m overgeneralizing) is essentially a way to write the same code as you could in C#, but with different syntax. However, that being said, there are no benefits to doing so, and the code you write is both ugly and dissimilar to any good language. So there&#8217;s simply not a reason to start here.</li>
</ul>
<p>I believe that about covers the most common starting points for a new programmer that I wouldn&#8217;t endorse. There may be others, but I don&#8217;t feel qualified to comment on languages that I myself haven&#8217;t learned to at least some degree. </p>
<p>Anyway, the more interesting stuff: what <span class='italic'>do</span> you learn, then? Haven&#8217;t I just ruled out like every popular language? </p>
<p>Well, understand it is quite random which languages end up becoming popular; indeed, the only thing they really have in common is that they are generally <span class='bold'>not</span> the best of their kind&#8211;or even if they were originally, others took what they did right and combined them with other stuff done better. </p>
<p>Assuming you fall into my target audience (you want to learn what will be helpful in the long run, recognizing that as a brand new programmer you won&#8217;t be writing 3D games and huge financial systems for a while anyway), you are have lots of pretty good options available. Here&#8217;s a list! I&#8217;m going to put it in order of &#8220;amount of brain-stretching required&#8221;&#8211;you can decide for yourself, based on your various capabilities, which might work best for you.</p>
<ul>
<li><span class='bold'>C#</span> &#8211; I&#8217;m a tad hesitant to recommend this as a first language. It was my first language, and it is a good language, yadda yadda. Syntactically, you can think of it as a significantly better version of Java: it has several constructs that Java doesn&#8217;t, making it much nicer to code in. It&#8217;s also got tremendous IDE support, which I think is good and bad as a programmer seeking to learn the ropes (but that&#8217;s a topic for a different blog). And when it all comes down to it, it will get you in a mode of thinking that is similar to a Java programmer&#8217;s: somewhat roundabout, somewhat repetitive, somewhat verbose.
<p>If you do choose C#, try and take advantage of the features that new versions have offered, and continue to make a great effort to do so as future versions are released. One of its big advantages over Java is it continues to introduce solid ideas from other languages every couple years. Note that it isn&#8217;t strictly Windows-only anymore; the effort to get it on other platforms has been actually quite successful.</li>
<li><span class='bold'>D</span> &#8211; I&#8217;m going to make an exception to my rule here, and list a language I&#8217;ve never learned. I do so because D is one of the languages I&#8217;ve only ever heard good things about&#8211;which is rare in the world of programming languages. D is, in short, what C++ should have been (or should be). It&#8217;s even designed to be able to fill that close-to-the-machine niche if needed. If you learn it, let me know how it goes!</li>
<li><span class='bold'>Python</span> &#8211; This is probably the most popular language out there that is the most solid and straightforward. It was designed to avoid trickiness and to be very uniform; indeed, their motto (paraphrased) is &#8220;There should be one way to do things.&#8221; This even includes how the code looks on a piece of paper: all very uniform. There are lots of newbie resources available, tons of example projects written in good style that you can study, and plenty of libraries to help you do all sorts of stuff.
<p>With as much praise as I have for it, I&#8217;m actually not the hugest fan of the language, simply because I tend to prefer a system that allows for a bit more cleverness. (There are also some aesthetic quibbles I have with it.) But you could do a lot worse than learning Python first. It will especially help with getting you in the habit of writing well-formed code, in any language.</li>
<li><span class='bold'>Ruby</span> &#8211; Ruby is similar to Python in some ways, but different in philosophy and in the sort of coder it tends to attract. It was my favorite language for a long time, and I think it scales well: you can start by writing in Python-like style, and as you learn new tricks, incorporate them. The result is both simple and concise. It commonly uses certain programming constructs that, while they may exist in a language like C#, don&#8217;t play as big a role&#8211;therefore in Ruby you get to appreciate their power more frequently and understand them sooner.
<p>Ruby was also designed with &#8220;metaprogramming&#8221; in mind&#8211;that is, you can play with how the language works. This isn&#8217;t really important to know as a newbie; I mention it as part of showing that there&#8217;s definitely &#8220;growing room&#8221; for your brain as you learn this language.<br />
<span class='italic'>Note: Don&#8217;t confuse Ruby with &#8220;Ruby on Rails,&#8221; which is a framework written <span class='bold'>in</span> Ruby. I <span class='bold'>don&#8217;t</span> recommend jumping into Rails right off the bat, without learning Ruby first.</span></li>
<li><span class='bold'>Scheme</span> &#8211; Scheme is a great little language, unfettered by frivolous syntax and unnecessary complexity. It is a &#8220;Lisp,&#8221; meaning one of a family of languages that share an important trait: they are incredibly easy for humans and computers to parse. This means you can easily write code that writes code. Programming in a Lisp is very fun if you don&#8217;t mind stretching your brain a bit&#8211;and I&#8217;m writing this blog for those that don&#8217;t.
<p>One nice thing about Scheme, is it is used as the example language in several books about <span class='italic'>how to learn programming the right way</span>. (Most programming books are closer to either &#8220;how to learn <span class='italic'>Language X</span> the right way&#8221; or &#8220;how to do task X with Language X&#8221;.) Also great is a couple of these books are free: <a href='http://mitpress.mit.edu/sicp/'>SICP</a> and <a href='http://www.htdp.org/'>How to Design Programs</a>. I also recommend <a href='http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1232925914&#038;sr=8-1'>The Little Schemer</a>.</li>
<li><span class='bold'>Haskell</span> &#8211; I&#8217;m learning Haskell now, and consider it to be the closest thing out there to the &#8220;holy grail&#8221; of languages. It&#8217;s incredibly well-designed, and is packed with cool features, and it has one of the most helpful communities I&#8217;ve yet encountered. It&#8217;s also the most brain-stretching of any language I&#8217;ve mentioned on this page. Though I&#8217;m sure some would disagree with me, I am of the opinion that it was designed by smart people, for smart people. Or, that is to say, that smart people will be able to harness it best. (Standard disclaimer about not measuring your self-worth by whether you can code in Haskell, yadda yadda [even though I personally measure my self-worth by everything I can't do... but that's for another blog.]
<p>I just mean that there is a lot you can do with a language like it if you have the tools upstairs, unlike, say, PHP&#8211;which is like &#8220;programming to the lowest common denominator.&#8221;) I won&#8217;t launch into any significant description of the language here, as someday I plan on writing about it more&#8211;hopefully in a fairly approachable way.</li>
</ul>
<p>Of course, there are many other good languages out there. Again, I&#8217;m a bit limited by what I&#8217;ve had time to digest personally. Also, some languages are worth learning, but perhaps not first. Let your intuition guide you&#8211;learning a language should be fun and interesting, and if it&#8217;s not, something is going wrong. If you absolutely aren&#8217;t enjoying one of my recommendations, don&#8217;t let that turn you away from programming in general; by all means give something else a shot. </p>
<p>I&#8217;m only able to speak out of hindsight, and indeed it&#8217;s probably that warped kind of hindsight wherein if you went back to your old self and gave him advice, he&#8217;d probably just look at you funny. But such is life, and such is programming. </p>
]]></content:encoded>
			<wfw:commentRss>http://my.life-is-virtual.com/2009/01/27/so-where-do-i-begin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmer Vocab Crash Course</title>
		<link>http://my.life-is-virtual.com/2009/01/27/programmer-vocab-crash-course/</link>
		<comments>http://my.life-is-virtual.com/2009/01/27/programmer-vocab-crash-course/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 04:41:08 +0000</pubDate>
		<dc:creator>jcooper</dc:creator>
				<category><![CDATA[Vaguely Instructional]]></category>
		<category><![CDATA[newbie]]></category>
		<category><![CDATA[programming-languages]]></category>
		<category><![CDATA[terminology]]></category>

		<guid isPermaLink="false">http://my.life-is-virtual.com/?p=43</guid>
		<description><![CDATA[Sometimes I wax nerdoquent in my posts. Hopefully this little glossary-type-thing will help. Syntax &#8211; This basically amounts to what you have to physically write in order to make a program do what you want it to do. If your &#8230;<p class="read-more"><a href="http://my.life-is-virtual.com/2009/01/27/programmer-vocab-crash-course/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><span class="summary">Sometimes I wax nerdoquent in my posts. Hopefully this little glossary-type-thing will help.</span></p>
<ul>
<li><span class="bold">Syntax</span> &#8211;  This basically amounts to what you have to physically write in order to make a program do what you want it to do. If your language has &#8220;lots of syntax,&#8221; you need to remember how lots of symbols interact with each other. (Note that &#8220;symbols&#8221; here can mean words or word-looking things, not just brackets and stuff.)
<p>A &#8220;lots of syntax&#8221; example (from C++) (of course!):</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">  <span style="color: #0000ff;">template</span> <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> _id_t, <span style="color: #0000ff;">typename</span> _mem_t<span style="color: #000080;">&gt;</span>
  <span style="color: #0000ff;">void</span> exchange<span style="color: #008000;">&#40;</span>map<span style="color: #000080;">&lt;</span>_id_t, _mem_t<span style="color: #000080;">&gt;</span><span style="color: #000040;">&amp;</span> ref, <span style="color: #0000ff;">const</span> _id_t<span style="color: #000040;">&amp;</span> id1, <span style="color: #0000ff;">const</span> _id_t<span style="color: #000040;">&amp;</span> id2<span style="color: #008000;">&#41;</span>
  <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">typename</span> map<span style="color: #000080;">&lt;</span>_id_t, _mem_t<span style="color: #000080;">&gt;</span><span style="color: #008080;">::</span><span style="color: #007788;">iterator</span> it1 <span style="color: #000080;">=</span> ref.<span style="color: #007788;">find</span><span style="color: #008000;">&#40;</span>id1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
      <span style="color: #0000ff;">typename</span> map<span style="color: #000080;">&lt;</span>_id_t, _mem_t<span style="color: #000080;">&gt;</span><span style="color: #008080;">::</span><span style="color: #007788;">iterator</span> end <span style="color: #000080;">=</span> ref.<span style="color: #007788;">end</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
      <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>it1 <span style="color: #000040;">!</span><span style="color: #000080;">=</span> end<span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
          <span style="color: #0000ff;">typename</span> map<span style="color: #000080;">&lt;</span>_id_t, _mem_t<span style="color: #000080;">&gt;</span><span style="color: #008080;">::</span><span style="color: #007788;">iterator</span> it2 <span style="color: #000080;">=</span> ref.<span style="color: #007788;">find</span><span style="color: #008000;">&#40;</span>id1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
          <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>it2 <span style="color: #000040;">!</span><span style="color: #000080;">=</span> end<span style="color: #008000;">&#41;</span>
          <span style="color: #008000;">&#123;</span>
              _mem_t tmp <span style="color: #000080;">=</span> it2<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>second<span style="color: #008080;">;</span>
              it2<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>second <span style="color: #000080;">=</span> it1<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>second<span style="color: #008080;">;</span>
              it1<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>second <span style="color: #000080;">=</span> tmp<span style="color: #008080;">;</span>
          <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>
  <span style="color: #008000;">&#125;</span></pre></div></div>

</li>
<li><span class="bold">Libraries, Standard Library</span> &#8211;  Where do you go to get books you didn&#8217;t write? The library! (Okay, pay no more heed to that analogy before it starts to fail.) A library refers to code that someone else has written that you can use. The &#8220;standard library&#8221; of a language refers to libraries that are included with the language itself; you don&#8217;t need to buy them or go find them on the internet or anything like that.</li>
<li><span class="bold">Abstraction</span> &#8211;  A way to view something in more simple terms. You can view a toaster as a fairly complicated combination of small circuits and whatnot, or you can view it as something that you put bread into and get toast out of. This is very important in programming, as at the lowest level you are dealing with a bunch of 1&#8242;s and 0&#8242;s&#8211;but you can get more work done if you don&#8217;t have to worry about them.</li>
<li><span class="bold">(Strongly/Loosely) Typed</span> &#8211;  This one is harder to simplify, because the issue of &#8220;types&#8221; in programming is a fairly complex one. But basically, it is talking about how much leeway your language gives you when you make computations. If you give a program something that&#8217;s not a number, but <span class="italic">looks</span> like a number, should your language treat it as a number? But what if it does and you weren&#8217;t expecting that? The less permissive languages (the &#8220;strongly typed&#8221; ones) tend to require more input from you, the programmer, on how to handle things, but they tend to alert you of potential errors sooner. Like many things in programming, there are tradeoffs.</li>
<li><span class="bold">Community</span> &#8211;  There are lots of communities on the internet. Each programming language has one too&#8211;a group of people of varying levels of experience and background who use that language. A friendly community is important, because that is where you go when you are stuck. Certain programming communities are quite elitist and, well, made up of jerks. (I&#8217;m looking at you, Common Lisp&#8230;)</li>
<li><span class="bold">Algorithm</span> &#8211;  A formalized procedure or formula for doing something. You use these all the time without maybe realizing it. For example, how do you choose which way to drive home from Point X? Do you pick certain streets with less stop signs? Avoid that place with the bad speed bump? Choose a different route during rush hour? These are all part of your algorithm for getting home.</li>
<li><span class="bold">ASP, .NET, Ruby on Rails</span> &#8211;  These things are not programming languages, but rather <span class="italic">frameworks</span> that are connected with programming languages. See below.</li>
<li><span class="bold">Framework</span> &#8211;  A framework is a broad term for a collection of <span class="italic">libraries</span> (see above) and recommended ways to use those libraries. You might have a framework for making websites, or a framework for interacting with graphics, etc.</li>
<li><span class="bold">IDE</span> &#8211;  This stands for &#8220;Integrated Development Environment,&#8221; which is a big huge program that helps you write programs. They can do anything from telling you when you forgot to type a semicolon to helping you debug and test your program.</li>
<li><span class="bold">Platform</span> &#8211;  A <span class="italic">platform</span> is a place where programs can be run&#8211;that is, a place that is programmable in one way or another. Windows, Linux, and OS X are platforms, as are the Xbox 360, the iPhone, and <a href="http://www.youtube.com/watch?v=CZrr7AZ9nCY">big-ass tables</a> &#8211; to name a few.</li>
<li><span class="bold">Metaprogramming</span> &#8211;  &#8220;Sup, dawg. I heard you like programming so I put programming in your programming!&#8221; When you can program your programming language, this is called <span class="italic">metaprogramming</span>.</li>
<li><span class="bold">Parse</span> &#8211;  To parse means to interpret or understand. We do it as humans when we read written language: we look for the combination of verbs, nouns, adjectives, and punctuation that delimits a thought. Computers do the same thing when reading your code: they turn your ideas, represented by syntax (see above), into tangible instructions it can use. (A bit of an oversimplification, but that&#8217;s the general idea.)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://my.life-is-virtual.com/2009/01/27/programmer-vocab-crash-course/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You can write COBOL in any language&#8230;</title>
		<link>http://my.life-is-virtual.com/2009/01/21/you-can-write-cobol-in-any-language/</link>
		<comments>http://my.life-is-virtual.com/2009/01/21/you-can-write-cobol-in-any-language/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 08:39:19 +0000</pubDate>
		<dc:creator>jcooper</dc:creator>
				<category><![CDATA[Misinformed Ranting]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[programming-languages]]></category>

		<guid isPermaLink="false">http://my.life-is-virtual.com/?p=24</guid>
		<description><![CDATA[Though languages are supposed to be a tool for expressing ourselves, their capabilities seem to also shape what we express. One commonly held belief is that it doesn&#8217;t matter what language you learn first. Whether we are talking English vs. &#8230;<p class="read-more"><a href="http://my.life-is-virtual.com/2009/01/21/you-can-write-cobol-in-any-language/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><em><strong>Though languages are supposed to be a tool for expressing ourselves, their capabilities seem to also shape what we express.</strong></em></p>
<p>One commonly held belief is that it doesn&#8217;t matter what language you learn first. Whether we are talking English vs. Spanish or Java vs. Scheme, there seems to be a fairly common opinion that &#8220;the ends justify the means;&#8221; programming languages are Turing-complete and natural languages are merely a conduit for expressing what every human can express. &#8220;The only difference is in what concepts the language makes easy,&#8221; it is said. However, notwithstanding practical concerns (this is not going to be a practical post in the sense of &#8220;them&#8217;s the ropes: learn English or C# or whatever for business reasons&#8221;), I would go so far as to say that our first language is very important in shaping <span class="italic">how</span> we think and approach expression.</p>
<p>If you&#8217;re reading this blog, you know I served a mission for my church in Russia, and as such had the opportunity to learn a second language with a reasonable degree of fluency. Additionally, I got to do this at a time in my life when I was already an adult, and could note with some interest particular peculiarities in differences of expression. Some things &#8220;are merely different&#8221;&#8211;for example, a lack of articles [the, a, an] doesn&#8217;t seem to hamper understandability, given the proper modifiers. &#8220;I see cat here.&#8221; &#8220;I see orange cat of which you speak.&#8221; Funny-sounding, perhaps, but understandable. What&#8217;s significant, however, is not that it&#8217;s <span class="bold">understandable</span>&#8211;not that it&#8217;s merely an alternate form of expressing the same concept. What strikes me is how <span class="bold">difficult</span> it is for Russians to properly use English articles. Here is a case of the difference between &#8220;acceptable fluency&#8221; and true fluency. It&#8217;s a separation, as it were, between brute-force means-justified ends, and intuitive comprehension of a concept.</p>
<p>Should Russians feel short-changed that they didn&#8217;t get this intuition &#8220;for free&#8221;? Perhaps. But by the same token, Russian is full of things that are definitely not intuitive for English-speakers, and which in turn provide entirely different dimensions of expression&#8211;flexible word order and particles come to mind. Sorry English, but Russian poetry kicks yours&#8217; butt. Which brings me to my next point: it would be awesome if we could pick which natural language to use for specific tasks that were suited for it.</p>
<p>We&#8217;ve actually seen examples of this in history &#8212; Italian is the universal language for music (though it can be argued that this is arbitrary. It has seemed to work well, though). Certainly most treaties are written in French (because they maintain stricter control over changes to the semantics of the language), and most men would use it for their sweet nothings if they could. I&#8217;m from California, which has a large population of people who have grown up with both English and Spanish simultaneously, and consequently switch between both languages in casual conversation with others like them&#8211;they pick the most convenient one for the thought (which might be only part of a sentence), and do so automatically.</p>
<p>However, we aren&#8217;t all free to do this. Indeed, it can be argued that even in my last example, such people are often sacrificing some degree of fluency in one language or the other. With natural languages, it just plain comes down to us not having any choice, most of the time. We didn&#8217;t choose where we were born, most high schools don&#8217;t even offer Russian, and there is no guarantee that the people you want to communicate with have made the same investment as you. Alas, being able to tailor our spoken language to the situation will likely never be a reality, but it does not change that the language we were raised with has, to one degree or another, shaped how we think.</p>
<p>I find programming languages fascinating. Many of the principles of natural languages apply, yet the scale is small enough that one can become &#8220;fluent&#8221; in multiple programming languages without investing years conversing with others who know it (though if you think about it, that can be helpful) or becoming immersed in another culture (though often it seems like you are). Additionally, programming languages are designed from the ground up, which tends to make them more uniform and consistent to a given purpose than natural languages, which grow out of a hodgepodge of history and intermingling. (It is interesting to note, however, that in a similar manner, many programming languages borrow from other programming languages, and some languages indeed develop quite haphazardly, organically, arbitrarily, and often stupidly&#8230; I&#8217;m looking at you, PHP.)</p>
<p>The biggest difference I&#8217;d like to point out is that you have the choice of which programming languages to learn, and especially which to learn first. I find it quite unfortunate that people tend to make this choice somewhat blindly (though they often think they are being pragmatic about it). This is a sensitive subject for programmers, especially ones who look at their craft primarily or solely as a way to put food on the table. To them, their language defines them, because it defines what jobs they can apply for. Without their language, they are without their job. Thus, they are going to press forward and try to ensure that they remain marketable by doing what they can to make their <span class="italic">language</span> marketable. Similarly, some find any, even temporary, decrease in perceived output unacceptable. These are the people who are still reaching for their mouse to correct a mistake made 3 lines previous, and who didn&#8217;t in fact notice their mistake at all until their IDE informed them of it after they clicked the little &#8220;go&#8221; button. Such people certainly aren&#8217;t going to learn a new language, no matter how much better it is, and when their language of choice adds new features, they bitch and moan.</p>
<p>These are all valid human emotions, and valid ways to approach programming. Certainly, much has been accomplished by programmers who work from 9 to 5 and don&#8217;t think about code again till after coffee the next morning. Programming is a valid profession, and it does make pretty good money. Indeed, it is even a safe profession&#8211;if you learn PHP or Java, you will always be able to get a job (at least until the industry changes&#8211;but hey, that&#8217;s never happened&#8230; right?). Besides, once you&#8217;ve learned one language, is just a matter of learning the syntax of a new one if you have to, right?</p>
<p>I contend that it is not. In the same way that I still can&#8217;t use particles correctly in Russian after living there for over two years, our first language&#8211;and by this I mean the first language really learned in depth&#8211;shapes <span class="italic">how we think</span>. We won&#8217;t use new, more powerful constructs if we don&#8217;t <span class="italic">think</span> to use them&#8211;it just never occurs to us. Or if you can&#8217;t find a spot for a new concept from the perspective of your current way of doing things, you won&#8217;t think to incorporate it. You&#8217;ll do it the old way. You may even modify company policy to make the new way illegal or discouraged&#8211;because you know how change is! Always bringing those temporary decreases in efficiency! Learning stuff, humbug! And it is easy to staunchly defend your decision; you can&#8217;t be swayed when you have no sense of comparison.</p>
<p>Certainly, I ran across this often in my attempts to share with others why religion is a quintessential part of my life. They don&#8217;t agree because they haven&#8217;t tried it, and they won&#8217;t try it because they don&#8217;t agree. Though certainly less important to the soul, the same thing happens in the world of programming.</p>
<p>A Java programmer has no idea what concise code looks like: Java doesn&#8217;t let you write it. You say &#8220;concise&#8221; to them, and they can only think &#8220;incomplete&#8221; or &#8220;cryptic&#8221;&#8211;because certainly you <span class="italic">can</span> code in those ways in Java, and just as certainly it&#8217;s not a good idea to do so. A PHP programmer has no concept of &#8220;ugly code,&#8221; because all of his code is ugly&#8211;the language is just that way. The C++ programmer does not know what &#8220;cruft&#8221; means. The Visual Basic programmer&#8230; well, even the aforementioned programmers pick on him. In fact, they all pick on each other, constantly and vitriolically. Why such bickering? For all of the reasons of the previous paragraphs: when Language A is your bread and butter, damn straight Language B shouldn&#8217;t exist.</p>
<p>And as I said earlier, people tend to rush into learning programming, and indeed you can&#8217;t blame them. How are they to know any differently? Just like politics, you are going to choose, as a new programmer, whatever people you look up to choose. Or, you let your pressing need completely govern your choice&#8211;I have to make my web page tell you when you typed something wrong, or I have to make a Windows form, or I have to add functionality to my WordPress blog, or I have to use a Mac, or whatever. (You programmers reading this will know which language fits the stereotypical mold for each of those tasks.) Remember what everybody says! &#8220;Languages don&#8217;t differ in what they can do, only in what they make easy.&#8221; That&#8217;s fine and great, until you&#8217;ve gotten quite proficient in that language doing the tasks it makes easy, and then you run into tasks that would be better &#8220;suited&#8221; to other languages. But by that time, there&#8217;s an investment, and after all, it would take longer to learn Language B than to just figure out an acceptable way to do it in Language A, right? Gee, it&#8217;d be nice to have a program that runs on my (or my client&#8217;s) OS natively, but I know PHP&#8230; hmm&#8230; well, I&#8217;ll just make it web-based.</p>
<p>On the other end of the spectrum, some languages get so pigeonholed into a niche that nobody considers them for what they are. Javascript is a fine example. Sure, it ain&#8217;t perfect, but it&#8217;s actually nicer than a lot of popular languages out there. But nope, it&#8217;s for Wendy Webdesigner to piddle around in when she wants to make a button clear the form fields on her web page. (Yes, &#8220;Web 2.0&#8243; has changed this slightly, but it&#8217;s just a different stereotype: now it&#8217;s for making cool fadey effects!) However, not even Javascript suffers the scorn of the truly unconsidered languages&#8211;the so-called &#8220;academic&#8221; ones. Lisp? Haskell? Perish the thought!</p>
<p>Ugh, sorry. I&#8217;ve gotten <span class="italic">way</span> too soapboxy&#8211;to the point where I&#8217;m  fortunate that no strangers read this blog, or I&#8217;d be getting hate mail from apologists everywhere. (And yes, all the apologists make more money than me.) My point, if you can remember my point, is that our pragmatism is affecting us more than we know. Programming is a field where you can literally always be learning, and where better ways to do things will forever be invented. Often these better ways will involve effort on our part if we want to harness them&#8211;new paradigms that we must tackle intellectually. It&#8217;s not just learning new syntax. And the relative difficulty of adapting is indeed affected by what we have learned previously.</p>
<p>I know I&#8217;ve been overly sardonic in this article because programming is my hobby as well as my profession, and programming languages as means of expression and problem-solving are of particular interest to me. But I do genuinely believe that aside from personal interest, these things have an impact on what kind of programmer you are and what kind of programmer you become. I don&#8217;t think it&#8217;s unreasonable to assume that a programmer who has learned new languages as part of helping him develop new ways of thinking&#8211;to obtain new tools to deal with various problems&#8211;might have some advantage over one who learned Language A because there are a lot of jobs for Language A.</p>
<p>It is my hope that some employers will consider this, and instead of just looking for Language A programmers because your competitor does, perhaps considering Language B. Or C. (Haha! C joke.) Likewise, I would hope that some Language A programmers would take the opportunity to broaden their horizons personally&#8211;chances are, it will even make you a better Language A Programmer. And it&#8217;s fun! I promise. And to aspiring programmers: it&#8217;s worthwhile to invest some time researching before polishing the {curly-braces} on your keyboard. Seek out a polyglot&#8211;we&#8217;d love to offer some advice.</p>
]]></content:encoded>
			<wfw:commentRss>http://my.life-is-virtual.com/2009/01/21/you-can-write-cobol-in-any-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

