<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Micah Elliott &#187; Hacking</title>
	<atom:link href="http://micahelliott.com/category/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://micahelliott.com</link>
	<description>Stories from my Startup Journey</description>
	<lastBuildDate>Mon, 29 Nov 2010 07:46:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<image>
  <link>http://micahelliott.com</link>
  <url>http://micahelliott.com/mde-gravatar7.png</url>
  <title>Micah Elliott</title>
</image>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.6.3" -->
	<copyright>Copyright &#38;#xA9; 2012 Micah Elliott </copyright>
	<managingEditor>mde@micahelliott.com</managingEditor>
	<webMaster>mde@micahelliott.com</webMaster>
	<category>posts</category>
	<image>
		<url>http://micahelliott.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>Micah Elliott &#187; Hacking</title>
		<link>http://micahelliott.com</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>Stories from my Startup Journey</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &amp; Culture" />
	<itunes:author></itunes:author>
	<itunes:owner>
		<itunes:name></itunes:name>
		<itunes:email>mde@micahelliott.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://micahelliott.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>Make a PC Keyboard UNIX-Friendly</title>
		<link>http://micahelliott.com/2009/04/make-a-pc-keyboard-unix-friendly/</link>
		<comments>http://micahelliott.com/2009/04/make-a-pc-keyboard-unix-friendly/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 18:47:43 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Living]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[keyboard]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=362</guid>
		<description><![CDATA[How many years have you been making the tedious stretch for Ctrl and Esc keys?  Maybe you&#8217;ve gone so far as choosing workflows that don&#8217;t require them much, maybe without even realizing it.  That would be sad.  You just can&#8217;t use vim or emacs (or even web browsers) without them.*  I stopped the stretching a [...]]]></description>
			<content:encoded><![CDATA[<p>How many years have you been making the tedious stretch for <code>Ctrl</code> and <code>Esc</code> keys?  Maybe you&#8217;ve gone so far as choosing workflows that don&#8217;t require them much, maybe without even realizing it.  That would be sad.  You just can&#8217;t use vim or emacs (or even web browsers) without them.*  I stopped the stretching a long time ago.  If you haven&#8217;t fixed this yet, you&#8217;re either crippling yourself, or being sub-optimally productive.  There are various ways to this and eliminate the stretching &#8212; I&#8217;ll touch on a couple so you can relieve your aching left wrist.<span id="more-362"></span></p>
<h2>Easiest way</h2>
<p><a href="http://us.st12.yimg.com/us.st.yimg.com/I/pfuca-store_2030_8561"><img class="alignleft" title="Happy Hacking Keyboard Lite 2" src="http://us.st12.yimg.com/us.st.yimg.com/I/pfuca-store_2030_8561" alt="" width="180" height="104" /></a>Almost a decade ago the <a href="http://pfuca-store.stores.yahoo.net/haphackeylit1.html">Happy Hacking keyboard</a> came out.  This was a brilliant product that I can&#8217;t believe hasn&#8217;t altogether replaced the PC layout and monster keyboard footprint.  I&#8217;ve had a few through the years, and I highly recommend them.  They have been at the $70 mark all along though, so I&#8217;ve decided to stop buying them, when commodity keyboards are a dime a dozen, even the small footprinted ones.  I&#8217;ve also had the legendary OMNIKEY (and maintain it as a keepsake), which is hands down the best keyboard ever made (clickety-click-clack).  But they&#8217;re even pre-PS/2, so probably impossible to get working with USB (let me know if you&#8217;ve done it!).  So that&#8217;s the first and <strong>simplest solution if you&#8217;ve got the budget: spend the money to get a great UNIX keyboard.</strong></p>
<p><strong><img class="aligncenter" title="OmniKey Ultra" src="http://www.amiga-hardware.com/download_photos/omnikeyultra_big.jpg" alt="" width="780" height="289" /><br />
</strong></p>
<h2>Harder, cheaper way (still easy enough)</h2>
<p>But you probably work at various machines, and everyone has a budget.  And sometimes we have to use that silly laptop keyboard.  So now you&#8217;re looking at <strong>a keyboard reconfig</strong>.  If you just want to make <code>CapsLock</code> go away (not a bad idea) and put <code>Ctrl</code> where it&#8217;s supposed to be (left of &#8216;<code>A</code>&#8216;), you can use GNOME to swap them.  Something like: <em>System -&gt; Preferences -&gt; Keyboard -&gt; Layouts -&gt; Other Options -&gt; Ctrl Key Position -&gt; Make CapsLock an additional Ctrl</em>.  There&#8217;s also some swapping options, but overall the options there are pretty rigid and don&#8217;t get you all the way there.  So don&#8217;t bother with this approach, unless you only want to fix the <code>Ctrl</code> key.</p>
<p>What you really need is <strong>xkeycaps</strong>.  You can install it in a Debian-based system with <code>apt-get install xkeycaps</code>.  Other distros should also make it easy.  It&#8217;s not the most intuitive tool to use if you haven&#8217;t played with it before (that&#8217;s why I&#8217;m writing this), so I&#8217;ll walk you through what I did with it.  BTW, it&#8217;s an ancient tool, from the legendary hacker <a href="http://www.jwz.org/">Jamie Zawinski</a>.</p>
<p>Some keyboard layouts vary slightly from <a href="http://en.wikipedia.org/wiki/IBM_PC_keyboard">the 104-key standard</a>, but I believe you can get any cheapo or absurd laptop layout to do the right thing with a little experimentation.  We&#8217;re going to be reassigning some keys.  It&#8217;s crucial that <code>Esc</code> is in a friendly spot &#8212; that probably means just left of your 1 key.  Even on a small keyboard with an <code>Esc</code> just one close row up, it&#8217;s still too far; you&#8217;ve gotta try putting it in the optimal spot.  But then you&#8217;ll be losing <code>`~</code> (or something)!  What a dilemma!  You can&#8217;t code without those.  Some will disagree with me here, but I have found the <code>RightAlt</code> key to be a great, easily right-thumb-accessible, unused key, so that&#8217;s what I now use for <code>`~</code>.  <code>RightAlt</code> is a sad loss if you&#8217;ve got a crappy mouse (since <code>RightAlt-LeftArrow</code> have been the canonical browser back-button), but that may be the subject of another article.  Just get a 5-button or tilt-wheel mouse; recent Ubuntus do the right thing with the extra buttons, in my experience.  So we&#8217;ll proceed here to use <code>RightAlt</code> as the <code>`~</code> replacement.  And we&#8217;ll be throwing away the original inaccessible <code>Esc</code>.  That top Function key row is off limits for touch-typists.</p>
<p>You can scramble a bunch of keys around as your see fit for your MO.  Here&#8217;s the process I used (as close as I can recall) for the <code>Ctrl</code>, <code>Esc</code>, <code>`~</code> reassignments I&#8217;ve been describing:</p>
<ul>
<li>Fire it up from a terminal: <code>xkeycaps</code></li>
<li>Just say &#8216;ok&#8217; on the first screen which should default to the right &#8216;PC&#8217; layout.</li>
<li>Hover over the <code>Esc</code> key and notice the <em>KeySym</em> at the top, indicating you&#8217;ve looking at <code>Esc</code>.  If you screw anything up, this is the place to see it.</li>
<li>Move away and physically press <code>Esc</code> and watch it light up on the screen.  Now you can verify any key&#8217;s position, which you want to do for any changing keys.</li>
<li>Make sure all the keys we care about are mapping to the right location.  I found that <code>RightAlt</code> on my wacky keyboard was actually mapping to my number pad&#8217;s <code>Enter</code>.  So figure out what your <code>RightAlt</code> is by pressing it.  That&#8217;s what we&#8217;ll reassign.</li>
<li>Make the first reassignment.  Right-click-hold on <code>`~</code> and select <em>Duplicate key</em>.  Then click on <code>RightAlt</code> (or its equivalent).  Now you&#8217;ve got another <code>`~</code> key! (and you can probably figure out the rest).</li>
<li>Now we can reassign the original <code>`~</code> to be an <code>Esc</code>.</li>
<li>Do the same <em>Duplicate key</em> trick to make the original <code>Esc</code> duplicated over <code>`~</code>.</li>
<li>Finally, do that process one more time assigning the original <code>Ctrl</code> (crazy bottom-left postion) over the top of <code>CapsLock</code>.  Added bonus: no more <code>CapsLock</code> key (remedy that if you want).</li>
<li>Write out the new layout with the <em>Write Output</em> button (just the <em>Changed Keys</em> is enough).</li>
<li>Now you&#8217;ve got a new <code>~/.xmodmap-<em>machinename</em></code> file.  I believe it&#8217;s already been activated at this point, or at least <code>xkeycaps</code> has done some magic.</li>
<li>You&#8217;re done.  You might find that some things are not working at this point.  You can always restart <code>xkeycaps</code> and restore to defaults.  But you&#8217;ve likely got things right, and just need to log out of X and log back in.  My arrow keys broke when I did this before restarting X.</li>
<li>Every time you start up X you&#8217;ll need to run <code>xmodmap ~/.xmodmap-<em>machinename</em></code>.  But Ubuntu (or something) actually automatically detected my new <code>.xmodmap</code> and prompted me to ask if I wanted to use it.  That was friendly!</li>
<li>Use some white-out or tape to relabel your new keys. (optional)</li>
</ul>
<p>Whew!  That was quite a few steps.  Fortunately, it&#8217;s just a one time setup, and subsequent uses of <code>xmodmap</code> at login are trivial (put it  in your <code>.bash_profile</code> or equivalent if not prompted; use <code>$(uname -n)</code> to make it flexible for a shared profile).  I hope you&#8217;ve got it working now.  You can leave a comment if you&#8217;re having any trouble with the steps and maybe I (or someone) will be able to figure it out.  Breathe a sigh of relief as you re-train your fingers to stop stretching.</p>
<p>I can no longer type without the hack described here.  You can probably alter it for any machine you&#8217;re on and any of your own different preferences.  I&#8217;m also considering making <code>Ctrl-J</code> a permanent duplicate for <code>Enter</code>.</p>
<p>I should also add a rant for why this article and tools need to exist: Shame on IBM and Microsoft and all the others involved for being such layout idiots and costing the world so much in ongoing <a href="http://en.wikipedia.org/wiki/Carpal_tunnel_syndrome">CTS</a> healthcare costs.  Especially when the optimal layout was already well-known and widely used.  Remind you of anything (backslash path separator, another ergonomic impropriety; plus countless others)?  It&#8217;s really interesting to just stare down at the PC location of Ctrl and Esc, two essential keys probably both in the top 5.  They couldn&#8217;t possible have been put in less convenient places.  Well, maybe they were just taking the QWERTY model of slowing down typists to the next level.  I&#8217;m surprised they didn&#8217;t think to move <code>Shift</code> up to <code>F5</code> and <code>Enter</code> over to <code>ScrollLock</code>.</p>
<p>Be sure to thank Jamie for saving your wrist and adding years of screen time to your life.</p>
<p><em><span style="color: #999999;">* Furthermore, I make the typical assumption you&#8217;re using some *NIX variant.  Why else would you be here?  But if you&#8217;re using Windows or a Mac there are some other tools floating around that will help you customize your keyboard layout; I&#8217;m sure they&#8217;ll be different from xkeycaps.  Whether hacker or not, anyone can benefit by making these changes.</span></em></p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2009/04/make-a-pc-keyboard-unix-friendly/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How to Choose and Learn a New Programming Language</title>
		<link>http://micahelliott.com/2009/03/how-to-choose-and-learn-a-new-programming-language/</link>
		<comments>http://micahelliott.com/2009/03/how-to-choose-and-learn-a-new-programming-language/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 03:00:37 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[qop]]></category>

		<guid isPermaLink="false">http://blog.micahelliott.com/?p=46</guid>
		<description><![CDATA[They say you should learn a new programming language every year.  I don&#8217;t necessarily agree, but it&#8217;s happening this year for me with R.  Here are the steps I have found over the years to make it go smoothly. If you&#8217;re a perl, C++, or Java zealot, it&#8217;s been nice knowing you&#8230; Why Learn a [...]]]></description>
			<content:encoded><![CDATA[<p>They say you should <a href="http://www.google.com/search?q=learn+new+language+every+year">learn a new programming language every year</a>.   I don&#8217;t necessarily agree, but it&#8217;s happening this year for me <a href="http://micahelliott.com/2009/03/considering-r-as-python-supplement/">with R</a>.   Here are the steps I have found over the years to make it go smoothly. If you&#8217;re a perl, C++, or Java zealot, it&#8217;s been nice knowing you&#8230;<span id="more-46"></span></p>
<h2>Why Learn a New Language?</h2>
<p>You may disagree or have your own unrelated reasons, but addressing the <em>why</em> seems a necessary start for such a <em>how</em> post.  Here are the reasons I could think of:</p>
<ol>
<li><strong>You want to impress someone.</strong> Your present/future boss?  Peers?   Just padding your resume?   This is not a very good reason.  Maybe just stick with perl/C++/Java.</li>
<li><strong>Pursue a new domain.</strong> E.g., I&#8217;m heading into R because it&#8217;s touted as the best for visualization and statistics, and even has some epidemiologic facilities I hope to make use of.</li>
<li><strong>You want to expand your mind.</strong> Given your new learnings, you&#8217;ll be able to achieve better/faster results with your present favorite language.  E.g., <a href="http://micahelliott.com/2008/06/a-single-command-to-get-started-on-functional-programming/">learning FP</a> is sure to help you with many other languages.</li>
<li><strong>You&#8217;re actually going to need to use the new language for real work.</strong> You need to work on some app written in it, or you think it will be the best tool for your next challenge.</li>
<li><strong>Get connected to a new community.</strong> Maybe those relationships will lead to finding startup founders.</li>
<li><strong>Have something new to write about.</strong> Not a great reason, but I suppose I&#8217;m guilty.</li>
<li><strong>Feed the hype machine.</strong> Maybe you&#8217;ve just heard too much buzz about a language and have to know what everyone&#8217;s talking about.  This was why I explored Ruby!</li>
</ol>
<p>There&#8217;s got to be more reasons.  <em>What have been yours?</em></p>
<h2>How Long Should it Take?</h2>
<p>Depending on your background and the new language you&#8217;re targeting, you should plan to dedicate  some significant time to learning it.  This is <a href="http://www.linuxjournal.com/article/3882">ESR on his first run-in with Python</a>:</p>
<blockquote><p><em>Not that it took me very long to learn the feature set. I wrote a working, usable fetchmailconf, with GUI, in six working days, of which perhaps the equivalent of two days were spent learning Python itself.</em></p></blockquote>
<p>Or you could side with <a href="http://norvig.com/21-days.html">Peter Norvig</a> and devote 10 years to it:</p>
<blockquote><p><em>&#8230;it takes about ten years to develop expertise in [a programming language].</em></p></blockquote>
<p>Maybe Peter only knows perl*, in which case I&#8217;d heartily agree, and <a href="http://steve.yegge.googlepages.com/ancient-languages-perl">so would others</a>.  Personally, <strong>I think a typical competent programmer can pick up a well-designed language in a couple solid months of hands-on study</strong>, though this estimate may be off by a couple years.</p>
<h2>How To Actually Learn It</h2>
<p>We all have to learn a bunch of languages throughout our hacking careers.  How do you go about picking up a new one?  Get a book?  Start hacking?  Stare at some existing code?  Those are all useful things to do, but I want to streamline the process and get to the best practices.  Here&#8217;s the checklist I&#8217;ve come up with for effectively and efficiently learning a new programming language:</p>
<ul>
<li><strong>Click around on the home site.</strong> Discover the documentation pages, FAQs, wiki, community, etc.  You&#8217;ll be back here a lot.</li>
<li><strong>See what Wikipedia has to say about it.</strong> You should see some interesting history and learn about why it behaves and looks the way it does.  Maybe you&#8217;ll even find something to add.</li>
<li><strong>Print out the Tutorial and work through it.</strong> Mark it up with colors.  Type the snippets into your REPL. Change them.</li>
<li><strong>Read the FAQ.</strong> At least browse it so you know something about the common pitfalls.<strong><br />
</strong></li>
<li><strong>Read the style guide.</strong> If it doesn&#8217;t have one, figure out why.  Hopefully you can find editor settings that will enforce it.</li>
<li><strong>Get a book.</strong> Sometimes it takes a couple.  With Perl you&#8217;ll need eight tomes, all of which will be witty, yet combinedly inconsistent.  With Python you&#8217;ll need <a href="http://www.amazon.com/Python-Nutshell-Second-OReilly/dp/0596100469/">one</a>. (some will argue which one that is, many are great).</li>
<li><strong>Avoid certain languages.</strong> If you can&#8217;t find a book that dedicates fewer than 100 pages to wholly describing the language core, then something is wrong with the language.  C++ and perl are violators of this, and prime examples of languages to avoid in all capacities, at all costs.  You will waste all your energy on learning and remembering their <strong>quirks</strong>, instead of focusing on problems to solve.   I can&#8217;t believe some institutions (my undergrad!) have used these to teach OOP.  I would go so far as to call their paradigm <em>QOP</em>, or &#8220;quirks-oriented programming&#8221;.  (<em>WOP</em> &#8212; &#8220;warts-oriented programming&#8221; &#8212; isn&#8217;t undeservedly harsh, but maybe not PC.).  They will damage your thinking process, waste years of your programming career, or destroy it altogether, and you will actually become <em>less</em> competent for having ingrained their quirks into your cognition.*</li>
<li><strong>Work through the examples in the book.</strong> Highlight and scribble all over it.  If the book is more than 600 pages, then either the language is crufty or the book is poorly organized, and you might not want either.</li>
<li><strong>Start collecting miscellaneous pages from around the web and bookmark and tag them appropriately.</strong> Look for <a href="http://delicious.com/ianb">language luminaries</a> that have created nice bookmark collections.</li>
<li><strong>Hang out on the IRC channel.</strong> That will be <a href="http://freenode.net/">irc.freenode.net</a>.  The traffic on some of these is overwhelming, but you can quickly get a feel for what are the tricky corners of the language.</li>
<li><strong>Find a local user group to meet people and get connected.</strong> You can even get a feel for the language by surveying the attendees. Watch for excessive drool! If a SIG doesn&#8217;t exist yet, then start one. If no one is interested in joining, move to a bigger town or find a new language, or try to associate with one online.</li>
<li><strong>Join the users (and announcements) mailing list.</strong> You&#8217;ll get to see lots of code written by others and see solutions to common problems.</li>
<li><strong>Watch some videos (Google tech talks) and slideshows.</strong></li>
<li><strong>Play in the REPL.</strong> Get a better REPL if available (ipython).  What, no REPL?  Beanshell doesn&#8217;t count.  Bye-bye, Java!</li>
<li><strong>Try the debugger.</strong> See if there are better ones.  Can you dive right into it from crashing code?</li>
<li><strong>Get the tool suite.</strong> Get familiar with the tools and understand why they&#8217;re necessary.</li>
<li><strong>Explore the vaults.</strong> Examples are Python&#8217;s PyPI (Cheeseshop), R&#8217;s CRAN, perl&#8217;s CPAN (though CPAN has similar issues to its books).  Having extensive add-ons is a good language health indicator.  Also note how difficult their packages are to install.</li>
<li><strong>Write a simple tool.</strong> That will season you in making use of important facilities.  A good example is grep, which will exercise regexes, getopt (Erlang&#8217;s was hard to find), command line, strings, files, etc.</li>
<li><strong>Blog about your experience.</strong> Trying to describe your learnings to others will ensure that you understand what you&#8217;re talking about.  Do I? <img src='http://micahelliott.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   <em>Learn by teaching</em> can be even more effective than <em>learn by doing</em>.</li>
<li><strong>Find the right interpreter/compiler.</strong> Some languages (Lisp) provide many.</li>
<li><strong>Install it, and its documentation</strong>.  <code>apt-get install ...</code> Not available in apt?  Then it&#8217;s too new, or you&#8217;re seriously bleeding edge, or it&#8217;s not viable.</li>
<li><strong>Figure out how to use the documentation systems.</strong> Manpages, info, &#8211;help, REPL-tab-completion, special tool (pydoc, Edoc, perldoc))</li>
<li><strong>Make sure your editor is equipped.</strong> What? it prescribes an IDE for you?  Later, Smalltalk (Squeak)!  Mess with your editor until it&#8217;s working as intended.  Syntax highlighting, auto-completion, auto-indent, macros, etc.</li>
<li><strong>Learn a bit about its history.</strong> Why was the language created.  For what niche?  Are its strengths and weaknesses reflected in that history?</li>
<li><strong>Make sure it&#8217;s open.</strong> I shouldn&#8221;t go into this again, and I realize it&#8217;s a loaded statement, but I say avoid anything that doesn&#8217;t have an excessively open community and standards body around it.  I&#8217;m still teetering on the Flex (Adobe) fence, but anything that Microsoft has had its hands in developing is simply poisonous.</li>
<li>Compare to a language you know.  What&#8217;s it most similar to?</li>
<li><strong>Take a class.</strong> This is often not necessary, but if you&#8217;ve got some college nearby they may offer something helpful.</li>
<li><strong>Get certified.</strong> Some languages have (silly) certifications.  The main benefit of them is that there is training material built around them that help you focus on what someone thinks are the important pieces of the language.  Doing this with Java helped my focus quite a bit (though I&#8217;ve since left the language behind).</li>
<li><strong>Watch/shadow a pro.</strong> This can be the absolute fastest way to see what to do, or what not to do.  Careful that you choose the right pro.</li>
<li><strong>Study the idioms and quirks.</strong> All languages have some quirks, <a href="http://wiki.python.org/moin/PythonWarts">even Python</a>.  It&#8217;s best to know about them early.</li>
<li><strong>Find and explore a project source base that is known to be well-written.</strong> Dive into the code.  Try making some changes.</li>
</ul>
<p>I&#8217;m not suggesting you need to do all these things for every language you explore.  This list could even serve as an evaluation for a new language you&#8217;re just considering.</p>
<h2>Bonus: Go Deep</h2>
<p>If you&#8217;d like to move on to the next prescribed level, here are some bonus activities:</p>
<ul>
<li>Find a bug in a library, and submit it to the <a href="http://en.wikipedia.org/wiki/Bug_tracking_system">BTS</a>.</li>
<li>Fix a bug and submit a patch.</li>
<li>Understand how to mark up your code for document auto-generation.  Write a manpage/vignette.</li>
<li>Check out the source using the VCS and build the compiler/interpreter yourself. If this is hard, you might consider if your apps to-be-written in this language can ever be deployed.  (Huge language bonus if they&#8217;ve got it together enough to be <a href="http://www.python.org/dev/peps/pep-0374/">using a DVCS</a>.)</li>
<li>Try your app on multiple OSs.  If you can get it to work on Linux, Mac, and Windows (at least Cygwin), you&#8217;re probably safe.  Even a web app should have some portability since you never know what future co-developers might think they need to do.</li>
<li>Start or join a real project.</li>
<li>Make use of shared memory or message passing or whatever concurrency facilities are provided.  Measure the quality of the language by how long it takes to figure out how to do robust parallel programming.  Erlang takes a week.  If it&#8217;s years, like most, you may want to move on, or read the next item.</li>
<li>Integrate with another language, particularly C.  If this is impossible, it&#8217;s probably a showstopper.  Compare to Python and R as benchmark examples.</li>
</ul>
<p>If you can&#8217;t accomplish all these things with the new language you&#8217;re considering, just move on to the next.  There are <a href="http://en.wikipedia.org/wiki/Alphabetical_list_of_programming_languages">plenty</a> to try!</p>
<p>Note that these are all great things to do when getting started with a new language.  However, you probably don&#8217;t want to be hanging out on IRC or mailing lists forever, or writing excessive posts about your fascinating new learnings, or reading too many books.  I&#8217;ve fallen into all those traps.  The best advice I can give you (and myself) is to get those hands dirty!</p>
<p><em>What other things do you do to get comfortable with a new language?</em></p>
<p><span style="color: #808080;"><em>* Notes: [1] Peter is actually pretty bright, and I was joking about perl.  I sat on the floor right next to him last year at <a href="http://micahelliott.com/2008/04/startup-school-impressions-should-you-attend/">Startup School</a>, without realizing who he was until he excused himself to give the next talk.  [2] Wow, Stevey; that second glass certainly does get the juices flowing!</em></span></p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2009/03/how-to-choose-and-learn-a-new-programming-language/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Considering R as a Python Supplement</title>
		<link>http://micahelliott.com/2009/03/considering-r-as-python-supplement/</link>
		<comments>http://micahelliott.com/2009/03/considering-r-as-python-supplement/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 18:00:12 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[r]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=311</guid>
		<description><![CDATA[It&#8217;s quite an investment to pick up a new programming language (syntax, semantics, types), along with all its periphery: tools, libraries, interfaces, environment, documentation, culture, user groups, history, idioms, and quirks.  I&#8217;m not trying to force myself to learn a new language every year, though looking back it&#8217;s pretty much turned out that way.  I [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite an investment to pick up a new programming language (syntax, semantics, types), along with all its periphery: tools, libraries, interfaces, environment, documentation, culture, user groups, history, idioms, and quirks.  I&#8217;m not trying to force myself to <a href="http://www.perlmonks.org/?node_id=397542">learn a new language every year</a>, though looking back it&#8217;s pretty much turned out that way.  I actually think there&#8217;s a skill-diluting effect in going shallow and trying to memorize syntax for a breadth of languages without knowing much about those other necessary peripheral pieces.  You really need a native language as a foundation by which you judge the others.  That may consist of a few, but I think there must be a small core.  Over the years my primary foundation has become Python.  I actually tend to steer away from the majority of new languages (especially since I rarely get into a situation where Python won&#8217;t handle the job), though the temptation of the new is sometimes great.  This year I&#8217;m having an especially hard time holding back the urge for the new.  It&#8217;s <a href="http://www.r-project.org/"><strong>R</strong></a>.  I&#8217;ve spent the last month telling myself I can&#8217;t make the commitment now given <a href="http://micahelliott.com/2009/01/reasons-for-creating-a-business/">how critical my development momentum is</a> to survival.  Well, R keeps taunting me, showing up <a href="http://en.wikipedia.org/wiki/23_Enigma">everywhere I look</a>.  I&#8217;ve got to figure out why it won&#8217;t leave me alone.  So here are the compelling pieces I&#8217;ve discovered thus far about R, that have me tinkering in its <a href="http://en.wikipedia.org/wiki/REPL">REPL</a>, wanting to buy <a href="http://www.amazon.com/Interactive-Dynamic-Graphics-Data-Analysis/dp/0387717617/">book</a> after <a href="http://www.amazon.com/Handbook-Statistical-Analyses-Using-R/dp/1584885394">book</a>, and even <a href="http://www.ggobi.org/demos/tour.html">having some strange dreams</a>.  I&#8217;m trying to compare to Python to evaluate the investment in learning another new language.<span id="more-311"></span></p>
<p>Here are some great things I&#8217;ve discovered about R:</p>
<ul>
<li><strong>Functional.</strong> Although <a href="http://micahelliott.com/2008/06/a-single-command-to-get-started-on-functional-programming/">I&#8217;ve dabbled in Erlang, Haskell, and ML</a>, and grown towards using Python in various functional ways (<a href="http://www.ibm.com/developerworks/library/l-prog.html">Mertz</a>, <a href="http://www.amk.ca/python/writing/functional">AMK</a>), I can&#8217;t say I&#8217;m <em>fluent</em> in any sanctioned <a href="http://en.wikipedia.org/wiki/Category:Functional_languages">functional language</a> (okay, I just added R to that list, but <a href="http://www.ibm.com/developerworks/linux/library/l-r2/">it should have been there</a>: &#8220;R&#8217;s functional parts come from Scheme.&#8221;)  I want to continue &#8220;breaking my brain in useful and creative ways&#8221;, and R fits the bill for completing this repertory need (I&#8217;ll probably head back to Haskell if/when a strong need for concurrency arises).</li>
<li><strong>Statistics and data analysis.</strong> <a href="http://www.amazon.com/Numerati-Stephen-Baker/dp/0618784608">The Numerati</a> and <a href="http://www.mckinseyquarterly.com/Hal_Varian_on_how_the_Web_challenges_managers_2286">other sources</a> say statisticians rule the world.  My eyes have been opened and I believe they&#8217;re right, so I&#8217;m working back my math chops.  It would appear that R&#8217;s statistics packages are more expansive than Python&#8217;s, and more is built into the language itself.</li>
<li><strong>Mathematical learning tool.</strong> It&#8217;s been a decade since I finished that math degree, but now the investment is finally paying off&#8230; I, uh, hypothesize.  I&#8217;ll blame the hiatus on not having found very interesting work to do until now &#8212; another reason to be self-employed, and why I&#8217;m loving life this year.  Anyway, I&#8217;m already getting re-versed in stats just by starting to use the language.  It&#8217;s looking like playing with R is a much better way to learn statistics than muddling through textbooks and paper-based homework.</li>
<li><strong>Graphical.</strong> Don&#8217;t know where to start.  There are <a href="http://en.wikipedia.org/wiki/R_(programming_language)#Graphical_user_interfaces">so many graphical tools</a> for R it is mind-numbing.  I&#8217;m starting to look at <a href="http://www.ggobi.org/rggobi/">RGgobi</a>, but there are lots of others to get acquainted with, including what&#8217;s built in.  I&#8217;ve worked through a couple graphical tutorials, and they seem to just magically pop up amazing graphs without having installed anything.  Try: <code>&gt; demo('graphics')</code> Notice how few lines of code are doing all that. Wow!</li>
<li><strong>Geospatial.</strong> I&#8217;ve got a need to be plotting data on maps in a variety of formats.  I&#8217;ve <a href="http://delicious.com/mdelliot/visual">found a lot of ways to do this</a>, but R seems to be the lightest, and <a href="http://grass.itc.it/">very capable</a>.</li>
<li><strong>High-level. </strong> Everything is a data structure.  Operations applied to variables are done across the whole set with no loops or treatment of individual items.  The syntax appears to be a bit richer (higher level, more sugar) than found in Python.</li>
<li><strong>I/O.</strong> R seamlessly slurps table-oriented text files for processing.  Output is also automatically formatted in nice text tables.  A mini-book (<a href="http://cran.r-project.org/doc/manuals/R-data.pdf">PDF</a>) describes this and much more.  My next learning task is to start <a href="http://rpgsql.sourceforge.net/">interfacing with PostgreSQL</a>.</li>
<li><strong>Kind of Python-like.</strong> I&#8217;ve started outlining another article that I hope to actually write someday called &#8220;R For Python Programmers&#8221; (since I can&#8217;t find such a guide).  Isn&#8217;t Python the gold standard to which <a href="http://www.amazon.com/Real-World-Haskell-Bryan-OSullivan/dp/0596514980/">great books</a> make comparisons these days?  I won&#8217;t duplicate that here, but simply say that I can&#8217;t believe how comfortable the syntax feels coming from Python nativity.  And R appears to <a href="http://rpy.sourceforge.net/">integrate very well with Python</a> (this probably being the more important point).</li>
<li><strong>Best REPL evar!</strong> I start evaluating any language simply by firing up its REPL and comparing its facilities to those of <a href="http://ipython.scipy.org">IPython</a>.  R&#8217;s REPL is on par with it (readline editing with vim-mode support, tab completion for everything, extensive help), and even has some extra niceties; e.g., function parameter tab-completion.  While getting started, note that the help system uses <code>?</code> and <code>??</code> <em>prefixes</em> instead of IPython&#8217;s suffix notation.  IOW, use <code>?topic</code> instead of <code>topic?</code> I&#8217;m getting the impression that a common workflow is spending lots of time in the REPL working with files and graphics.  This is probably the killer feature that enables me to quickly get up to speed.</li>
<li><strong>Documentation.</strong> The pages aren&#8217;t pretty, but there is a mass of info on the R site.  And AFAICT R is the foremost language used in recent Statistics textbooks.  There&#8217;s also a free 100-page (a good length, compare to Python Tutorial) <a href="http://cran.r-project.org/doc/manuals/R-intro.html">intro book</a>.  It&#8217;s horrible for non-programmers, and less than perfect for non-statisticians, but will get you familiar with some language features.  Appendix A offers a nice REPL walk-thru of language features.  I can&#8217;t find any Python books with much treatment of numerics, except for <a href="http://www.amazon.com/Python-Scripting-Computational-Science-Engineering/dp/3540739157">this one</a> which seems to touch on some but shares space with language basics.</li>
<li><strong>CRAN.</strong> Incredibly diverse libraries (<a href="http://cran.r-project.org/web/packages/">list of packages</a>) for statistics, graphics, and even <a href="http://www.medepi.net/epir/">Epidemiology</a> (probably overkill for my present needs).</li>
<li><strong>Mature and well-designed.</strong> R has been growing as the de facto FOSS statistical/graphical language <a href="http://cran.r-project.org/doc/html/interface98-paper/paper.html">for over a decade</a> (inception in 1993, in <a href="http://micahelliott.com/2008/06/1983-96-the-golden-age-of-programming-languages/">the golden age</a>).  It has grown up from the learnings of its ancestor <a href="http://en.wikipedia.org/wiki/S_(programming_language)">S</a> (shouldn&#8217;t R then be T??; I guess similar to C-&gt;B-&gt;A progression), which came onto the scene circa 1976 (a good year <img src='http://micahelliott.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</li>
<li><strong>Widely used.</strong> A survey of university statistics courses and Public Health curricula show R as a prevalent tool; e.g., UC Berkeley and Iowa State.</li>
<li><strong>UNIX-friendly.</strong> I was humored to see that R is more apt to borrow names from UNIX commands than from other languages.  The commands for managing a namespace are <code>rm</code> and <code>ls</code> &#8212; easy for me to remember. <img src='http://micahelliott.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   And I&#8217;m glad to see it has good roots.</li>
<li><strong>Trivial Ubuntu installation.</strong> Try this: <code>apt-get install r-recommended r-cran-&lt;tab&gt;&lt;tab&gt;</code></li>
<li><strong>Script-friendly.</strong> Rscript enables R to act as a scripting language.</li>
<li><strong>PDX-visualization group.</strong> This month we&#8217;re starting up <a href="http://micahelliott.com/2009/03/getting-started-with-graphviz/">a group to discuss visualization technology/advances</a>, and R will be the primary language under discussion.  My statistician friend, <a href="http://twitter.com/znmeb">Ed</a>, won&#8217;t stop talking about R, and he&#8217;s someone I&#8217;ve come to listen intently to.</li>
</ul>
<p>It&#8217;s a bit early to be writing an article on a language I haven&#8217;t done much with yet.  But I had to explore what&#8217;s pushing me towards R.  Looks pretty compelling now, so I&#8217;m very close to diving in (actually using it in a project).  I&#8217;ve sprinkled a number of resources throughout this post which I hope will be helpful for newcomers to R (including myself).  I should also mention that the best articles I&#8217;ve seen on introducing R are by David Mertz (a very capable Pythonista): Statistical Programming with R, <a href="http://www.ibm.com/developerworks/linux/library/l-r1/">Part I</a> and <a href="http://www.ibm.com/developerworks/linux/library/l-r2/">Part II</a>.</p>
<p>I can&#8217;t ignore what&#8217;s been growing out of  <a href="http://www.scipy.org">Scipy</a>, especially the <a href="http://www.scipy.org/Cookbook/Matplotlib/Maps">maps</a>.  And <a href="http://matplotlib.sourceforge.net/gallery.html">matplotlib&#8217;s gallery</a> is incredible (and I have some of them working).  The above items are all great features of R, but if I can accomplish them nearly as well in Python I probably shouldn&#8217;t invest too much into R.  At this point it does appear that R offers some facilities beyond Python.  <em>Have you worked with both Python and R and found compelling reasons to prefer R?  For which types of tasks?</em></p>
<p>My pain points with Python today are in analyzing query data (ad hoc in loops and heuristics), and creating a bunch of different formats to send to various third-party visualizations.  My analysis is going to need to get more sophisticated, and I&#8217;d like to be able to look at data visually quickly with less overhead.</p>
<p>I&#8217;m probably overstating the investment required in getting up and running with R; it&#8217;s <a href="http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html">supposed to be easy to pick up</a>.  I&#8217;d really like to get to being comfortable with applying <a href="http://en.wikipedia.org/wiki/Statistics">non-trivial statistics</a>, which means working through some R books.  I&#8217;ve made it this far (and now so have you), so I&#8217;m going for it, hoping it will be a pretty quick learn.  <em>Please feel free to share your experiences with learning and using R!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2009/03/considering-r-as-python-supplement/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Getting Started with Graphviz</title>
		<link>http://micahelliott.com/2009/03/getting-started-with-graphviz/</link>
		<comments>http://micahelliott.com/2009/03/getting-started-with-graphviz/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 19:44:22 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[graphviz]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[visualization]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=304</guid>
		<description><![CDATA[I&#8217;m getting pretty excited for the first meeting of the PDX-visualization group (which I convinced Ed to expand his R Language Study group into).  One of the topics we&#8217;ll be going over is Graphviz.  It&#8217;s old as dirt (ChangeLog goes back to 2000 at v1.7, but I&#8217;m guessing it&#8217;s at least a decade older) and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m getting pretty excited for the <a href="http://groups.google.com/group/pdx-visualization/browse_thread/thread/592f4563abbd2e95">first meeting</a> of the <a href="http://groups.google.com/group/pdx-visualization/">PDX-visualization</a> group (which I convinced Ed to expand his R Language Study group into).  One of the topics we&#8217;ll be going over is <a href="http://www.graphviz.org/">Graphviz</a>.  It&#8217;s old as dirt (ChangeLog goes back to 2000 at v1.7, but I&#8217;m guessing it&#8217;s at least a decade older) and has long been the de facto UNIX tool chain for creating graphics with code; i.e., without needing a graphics editor.  I believe it has only recently adopted a true FOSS <a href="http://www.graphviz.org/License.php">license</a>, which may really help its cause.  Graphviz use is pervasive in journals and books, and even shows up in wikis (<a href="http://c2.com/cgi/wiki?GraphViz">c2</a>, <a href="http://www.selenic.com/mercurial/wiki/index.cgi/UnderstandingMercurial">Mercurial</a>).  It&#8217;s such a simple graphics package to make use of, but a couple early steps might not be obvious to first-timers.  I&#8217;ve done a bit of exploring to get off the ground &#8212; here are some good resources I&#8217;ve found.<span id="more-304"></span></p>
<ul>
<li><code>$ apt-get install graphviz python-pydot python-pygraphviz  # Python/Ubuntu friendly</code></li>
<li><code>$ man graphviz</code> (will lead to many other pages)</li>
<li><a href="http://www.linuxdevcenter.com/pub/a/linux/2004/05/06/graphviz_dot.html">O&#8217;Reilly tutorial</a> by Michele Simionato (some other tutorials are not great)</li>
<li>Some flickr <a href="http://www.flickr.com/photos/kentbye/sets/72157601523153827/">example images</a>, some with sample code included<a href="http://cli.gs/4g8bPt" target="_blank"></a></li>
<li>Simplest first use: <code>$ dot hello.dot -Tpng -o hello.png &amp;&amp; firefox hello.png</code></li>
<li><a href="http://code.google.com/p/pydot/">Use from Python</a></li>
<li><a href="http://moinmo.in/GraphVizForMoin">Plug Graphvis into your wiki</a> (MoinMoin)</li>
</ul>
<p>I (with Tim) am also planning to show some of our progress on visualizations for uGraph, so be sure to <a href="http://calagator.org/events/1250456781">show up for the meeting</a>.  And what a fantastic group of folks: many entrepreneurs and data miners.  Should be a great after-party!</p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2009/03/getting-started-with-graphviz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send Email from a Webhost Script</title>
		<link>http://micahelliott.com/2009/02/send-email-from-a-webhost-script/</link>
		<comments>http://micahelliott.com/2009/02/send-email-from-a-webhost-script/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 08:35:53 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=276</guid>
		<description><![CDATA[Some webhosts make it a bit tedious to send email from your shell, and even harder inside your scripts or web apps.  But setting up Django properly enables this to become a one-liner whenever you need it. After some hunting around I found a help article at Webfaction describing the process of sending mail from [...]]]></description>
			<content:encoded><![CDATA[<p>Some webhosts make it a bit tedious to send email from your shell, and even harder inside your scripts or web apps.  But setting up Django properly enables this to become a one-liner whenever you need it.<span id="more-276"></span></p>
<p>After some hunting around I found <a href="https://help.webfaction.com/index.php?_m=knowledgebase&amp;_a=viewarticle&amp;kbarticleid=49">a help article at Webfaction</a> describing the process of sending mail from a script (with Python, nice! give it a thumbs up; those guys are great).  I could easily enough put some code like that into a function in a utility module to be called from various places, but it&#8217;s kind of ugly and repeats some data multiple times and requires a couple more imports.  On a development box I got Django&#8217;s handy <a href="http://docs.djangoproject.com/en/dev/topics/email/#topics-email">send_mail</a> function to work, but even with the described <em>smtplib</em> setup work on the webhost, the Django convenience was not going to fly.  But shortly into that Django article you see some setting parameters that are not part of the default django-admin-generated skeleton.  I tried setting these like so:</p>
<pre name="code" class="python">if platform.uname()[1].lower() == 'myserver.webfaction.com':
    EMAIL_HOST = 'smtp.webfaction.com'
    EMAIL_HOST_USER = 'my_user_name'
    EMAIL_HOST_PASSWORD = get_my_password()</pre>
<p>And now I can simply send myself emails by making calls to <em>send_mail</em>, like this:</p>
<pre name="code" class="python">from django.core.mail import send_mail
...
send_mail("New beta user signed up!",
    "%s\n%s" % (email, text),
    "beta@mycompany.com", [ADMIN])</pre>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2009/02/send-email-from-a-webhost-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Web Development Getting Started Guide</title>
		<link>http://micahelliott.com/2009/01/python-web-development-getting-started-guide/</link>
		<comments>http://micahelliott.com/2009/01/python-web-development-getting-started-guide/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 22:06:28 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=246</guid>
		<description><![CDATA[Our front-end guru wants to take the plunge and get to know more about our middle and back (and way-back) ends.  There are more than a couple steps down the road to mastery, but the essentials are enough to get you well on your way.  This is a brief (link-farm) guide for someone with some [...]]]></description>
			<content:encoded><![CDATA[<p>Our front-end guru wants to take the plunge and get to know more about our middle and back (and way-back) ends.  There are more than a couple steps down the road to mastery, but the essentials are enough to get you well on your way.  This is a brief (link-farm) guide for someone with some programming experience, but new to <a href="http://python.org">Python</a>/<a href="http://djangoproject.com">Django</a> &#8212; heavy on my biases.  Have fun, Tim!</p>
<p><span id="more-246"></span></p>
<p>I&#8217;ll assume you&#8217;re on a Debian-based/derived system and have access to <code>apt-get</code>.  If not, you can probably install all of these by downloading individually or relying on easy_install/PyPI.</p>
<h3>Python</h3>
<p>These are the resources to get you familiar with the language, culture, and communities.  I personally like to start with books.  I&#8217;ve read many, but thanks to Python&#8217;s clean/simple design, only a couple are actually necessary to make you proficient.</p>
<p>Install: <code>sudo apt-get install python python-ipython python-setuptools</code></p>
<ul>
<li><code>python -c 'import this'</code> (Zen of Python)</li>
<li><a href="http://docs.python.org/glossary.html">Python glossary</a></li>
<li><a href="http://docs.python.org/tutorial/">Python tutorial</a></li>
<li><a href="http://docs.python.org/library/">Python Standard Library</a></li>
<li><a href="http://wiki.python.org/moin/">Python wiki</a></li>
<li><a href="http://pypi.python.org/pypi">PyPI</a></li>
<li>Book: <a href="http://www.amazon.com/Python-Nutshell-Second-OReilly/dp/0596100469/">Python in a Nutshell</a> (best Nutshell book ever written, regexes and libs coverage pretty comprehensive, but hoping for Py3k coverage soon!)</li>
<li>Alternative free/open book: <a href="http://diveintopython.org/">Dive Into Python</a></li>
<li>Book: <a href="http://www.amazon.com/Python-Cookbook-Alex-Martelli/dp/0596007973">Python Cookbook</a> (also <a href="http://code.activestate.com/recipes/langs/python/">online ASPN Cookbook</a>)</li>
<li><a href="http://www.python.org/dev/peps/pep-0008/">PEP 8</a> (style guide)</li>
<li><a href="http://www.python.org/doc/faq/programming/">Programming FAQs</a></li>
<li>Editor configuration (vim: set ts=4 ai sw=4 et tw=72; research equivalents your favorite editor; emacs good alternative)</li>
<li><a href="http://docutils.sourceforge.net/rst.html">ReStructuredText</a> (ReST)</li>
<li><a href="http://mail.python.org/mailman/listinfo/python-list">Python mailing list</a></li>
<li><a href="http://www.python.org/community/irc/">Python IRC</a></li>
<li><a href="http://wiki.python.org/moin/LocalUserGroups">Find a Python user group</a> (ours is <a href="http://wiki.python.org/moin/PortlandPythonUserGroup">Portland</a>)</li>
<li><a href="http://docs.python.org/3.0/whatsnew/3.0.html">The here/near future</a> (Python 3)</li>
</ul>
<h3>Tools</h3>
<p>If you only get one thing out of this article, let it be this: <strong>Use <a href="http://ipython.scipy.org/moin/">ipython</a> to interactively discover the language and libraries.</strong> It&#8217;s the most powerful <a href="http://en.wikipedia.org/wiki/REPL">REPL</a> of any language I&#8217;ve encountered, and is what really makes Python rise to the top for learnability.</p>
<p>Install: <code>sudo apt-get python-ipython pylint pyflakes pychecker mercurial python-nose pydb python-coverage python-sphinx</code></p>
<ul>
<li>Interactive play: <code>ipython</code> (try: <code>foo.&lt;tab&gt;</code> and <code>foo?</code> and discover everything!)</li>
<li>PyPI installables: <code>easy_install</code></li>
<li>Testing: <a href="http://somethingaboutorange.com/mrl/projects/nose/">nose</a></li>
<li>Debugging: <a href="http://bashdb.sourceforge.net/pydb/">pydb</a> (<a href="http://bashdb.sourceforge.net/pydb/features.html">extended</a> Python debugger)</li>
<li>Lint/correctness: pylint, pyflakes, pychecker</li>
<li>Code coverage: <a href="http://garethrees.org/2001/12/04/python-coverage/">python-coverage</a></li>
</ul>
<p>I&#8217;ve skipped some really useful tools that go beyond the essentials.  If you&#8217;re going to become a Python zealot, you&#8217;ll want most of your tools to be written in Python.  These might include Mercurial, Bazaar, Trac, MoinMoin, Sphinx.  We still need investigate the use of <a href="http://oreilly.com/catalog/9780596527808/">Selenium and Twill</a> for web testing.  (We&#8217;re now using <a href="http://postgresql.org">PostgreSQL</a> for all our database work for several reasons, but one of the most significant is its REPL similar in introspective capability to ipython.)</p>
<h3>Django</h3>
<p>Our choice of <a href="http://djangoproject.com">Django</a> was not an easy one, but after some time with <a href="http://pylonshq.com">Pylons</a> and <a href="http://turbogears.org">TurboGears</a> (and even RoR), it was the winner.  It&#8217;s also <a href="http://www.reddit.com/r/programming/comments/dykr/django_chosen_as_the_official_python_web">arguably sort of the official Python web framework</a> and does appear to have critical mass (<a href="http://www.google.com/search?q=django+pylons+turbogears">AFAICT</a>).  The Django website lists many of the following resources pretty clearly, but I have found these to be the most useful, and so worth enumerating here.</p>
<p>Install: <code>sudo apt-get python-django python-psycopg2 python-sqlite3</code></p>
<ul>
<li><a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/">Django tutorial</a></li>
<li><a href="http://www.mercurytide.co.uk/news/article/django-cheat-sheet/">Django cheat sheet</a></li>
<li>Book: <a href="http://www.djangobook.com/">The Django Book</a> (especially chs 3-5,12)</li>
<li><a href="http://docs.djangoproject.com/en/dev/">Django documentation</a></li>
<li><a href="http://toys.jacobian.org/presentations/2007/oscon/tutorial/">Django Master Class presentation</a></li>
<li><a href="http://docs.djangoproject.com/en/dev/faq/">Django FAQs</a></li>
<li><a href="http://groups.google.com/group/django-users">Django mailing list</a></li>
<li><a href="http://docs.djangoproject.com/en/dev/topics/testing/">Testing Django page<br />
</a></li>
<li><a href="http://groups.google.com/group/django-users/browse_thread/thread/24a50006c43f43b5/eee75d48505d1af5">Long Django testing discussion</a></li>
<li><a href="http://github.com/robhudson/django-debug-toolbar/tree/master">Django Debug Toolbar</a></li>
<li>Especially informative blog: <a href="http://www.b-list.org/weblog/">B-List</a></li>
<li><a href="http://www.djangoproject.com/community/">Most Django blogs</a></li>
</ul>
<p>Please include any of your favorite resources for Python/Django newbies in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2009/01/python-web-development-getting-started-guide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>From E-book to Real Book</title>
		<link>http://micahelliott.com/2008/12/from-e-book-to-real-book/</link>
		<comments>http://micahelliott.com/2008/12/from-e-book-to-real-book/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 18:53:17 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Copy]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Hacking]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=220</guid>
		<description><![CDATA[I find myself printing out PDFs frequently.  Call me old fashioned, but I prefer the comfort of a recliner while I read, and my idea of portability is something printed.  Maybe this is why I spend all my money on real books.  But that has got to stop!  I&#8217;ve noticed a trend that most of [...]]]></description>
			<content:encoded><![CDATA[<p>I find myself printing out PDFs frequently.  Call me old fashioned, but I prefer the comfort of a recliner while I read, and my idea of portability is something printed.  Maybe this is why I spend all my money on real books.  But that has got to stop!  I&#8217;ve noticed a trend that most of the documents (or e-books) I&#8217;m printing are less than 100 pages &#8212; pretty small.  I don&#8217;t like to print at full scale; it wastes paper and makes it harder to tote around.  So I print at 25% (4 minipages per physical page), double-sided, to get 8-to-1 economy.  This all on my $100 Linux-compatible printer.  Today I have <a href="http://www.amazon.com/The-Bootstrappers-Bible-Volume-1/dp/B00005R2F8">The Bootstrapper&#8217;s Bible</a> (TBB)  folded and tucked away nicely into my pocket.  It&#8217;s 64 pages, but the way I printed it makes it only 8 physical (did Seth plan that?).  The problem is that it&#8217;s really awkward to make page turns, or navigate, or find things later, or see any obvious linearity, or even lay the thing down, or insert a bookmark.  And I&#8217;ve got them lying all over the place; how can I organize these??</p>
<p><span id="more-220"></span></p>
<p><em><strong>UPDATE:</strong> I now do almost all my reading on an Android, using Aldiko or Kindle apps. Amazing what two years have done for books! I haven&#8217;t printed a book according to this post in a while. I&#8217;m finally publishing this post (sans the pictures that would have been helpful) in case it&#8217;s still useful to anyone to be able to print sub-120-page e-books on their own printers. And I&#8217;m posting the script as a <a href="https://gist.github.com/719699">gist</a> in case anyone wants to use it.</em></p>
<p>So I did my usual routine of over-thinking a problem (held probably only by myself), and decided I should be able to print TBB just like a publisher.  It should have linear flow, be bound in the middle (with a couple staples); basically equivalent to a real book.  Hmm, now how to lay out those pages?  Just a <a href="http://www.catb.org/jargon/html/S/SMOP.html">SMOP</a>, right?  Almost.</p>
<p>After messing around with various printer utilities (cups, lp, lpr, lpoptions, foomatic, and more) and being teased that I was close, I ultimately was not able to invoke the printer the way I needed from a script.  But even if I could, it would be a pretty system-specific solution.  Probably better would just be to print out a list of page numbers that could be pasted into any print-wizard&#8217;s &#8220;page range&#8221; prompt.  I don&#8217;t need to automate this completely (yet).</p>
<p>If you&#8217;ve given any thought to what such a page arrangement would look like you&#8217;ll realize it&#8217;s slightly complex.  But I got a little script working that does the job well.  I&#8217;ll spare the details unless you ask for them.  <a href="https://gist.github.com/719699">Download it here</a>.  Basically, the order for an 8-page book is: 8,1,6,3,2,7,4,5.  You can print out your pages in that sequence, cut them vertically in half (hopefully you&#8217;ve got a honking-blade paper cutter, but scissors will do), put the pages on top of each other, and squeeze off two staples in the middle for the binding.  Wrapping in 100-lb cover is optional.</p>
<p>There&#8217;s one remaining hurdle.  Say you want to print a 7 page book.  Now the order is *blank*,1,6,3,2,7,4,5.  Does your printer allow that?  How about 9 pages?  b,1,b,3,2,b,4,b,b,5,b,7,6,b,8,9?  (I think that came out right; time to try it out.)</p>
<p>If you run the script you&#8217;ll simply get a one-line listing of page numbers. These can be pasted right into your browser&#8217;s &#8220;print&#8221; menu (if you&#8217;re lucky enough to be using GNOME).</p>
<p>And I should mention the other minor issue: a standard USA stapler has about a 4 inch (actually 9 cm) arm reach.  But you need 4¼ inches (obviously for 8½-inch wide paper).  So get creative or get an extended-arm stapler.</p>
<p>My vision is that the burgeoning class of new authors writing 100-page e-books can print-publish their own books basically for free.  Maybe it costs them a quarter to print each book, and two stamps to send it in the mail.  But for about $1 USD a new author can hit quite an audience without a publisher or bank account.  Yes, much of the world will just read e-books and manuals online, but there is still a broad group who doesn&#8217;t want to read more than a blog post-length article at their screen.  They can still benefit from printed copy.  I&#8217;m planning on devoting a whole shelf just for my own crude-bound &#8220;books&#8221;.  Next step is to find a clean way to have a quarter-inch flat binding that will take a label-maker sticker.</p>
<p>BTW, printer ink is a scam:http://www.csmonitor.com/2008/0109/p14s01-stct.html</p>
<p><a href="http://oreilly.com/store/series/sc.csp">O&#8217;Reilly&#8217;s Short Cuts</a> are a great for printing.  And O&#8217;Reilly is also supporting ePub by releasing 400 commercial books for the format.</p>
<p><em><strong>ALSO NEW</strong>: You can use <a href="http://www.fbreader.org/">FBReader</a> or <a href="http://calibre-ebook.com/">Calibre</a> for desktop reading: apt-get install fbreader calibre</em></p>
<p><em> <strong>ALSO NEW</strong>: I  also just bought a handful of Pragmatic Programmers books in  e-format,  as .epub, .mobi, and .pdf. Those are looking great on both my  Android  and desktop. Some PDFs are still worth printing.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2008/12/from-e-book-to-real-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editor Color Scheme Philosophy</title>
		<link>http://micahelliott.com/2008/12/editor-color-scheme-philosophy/</link>
		<comments>http://micahelliott.com/2008/12/editor-color-scheme-philosophy/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 08:40:10 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[checklist]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=194</guid>
		<description><![CDATA[I&#8217;m pretty picky when it comes to how I look at my code.  My tastes might even be a bit unique &#8212; I like things really small, colorful (earth-toned rainbow), and highly differentiated.  There are so many things that I value in a scheme that I decided to try and collect them here.  I use [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pretty picky when it comes to how I look at my code.  My tastes might even be a bit unique &#8212; I like things really small, colorful (earth-toned rainbow), and highly differentiated.  There are so many things that I value in a scheme that I decided to try and collect them here.  I use <a href="http://www.vim.org">Vim</a>, but this article should be editor-agnostic.  Have a look at my recent version of <a href="http://www.vim.org/scripts/script.php?script_id=1365">Adobe color scheme for Vim</a> that aims to satisfy the criteria of this article.</p>
<p><span id="more-194"></span></p>
<p>It&#8217;s worth mentioning that some people hate syntax highlighting, and claim that it is distracting or gives them a headache.  My guess is that most of these people have never had the chance to work with a subtle-yet-attractive color scheme.  It&#8217;s a pretty well-accepted fact syntax highlighting is useful for catching typos and various bugs.  It takes a bit of training to notice when something highlights in an unexpected way, or doesn&#8217;t highlight when it should, but an eye for it can really improve your code quality.</p>
<h2>Philosophy</h2>
<ul>
<li>Nothing should be bold unless it&#8217;s very important and should stand out above all other things. Functions/classes are good for this.  (I&#8217;m actually using a font/size now that does not support bold.)</li>
<li>Colors should be easy on eyes to stare at for many hours.  The background should be extremely comfortable for your eyes, so not white, and probably not even black.</li>
<li>Todos should stand out just a little (underline looks nice).</li>
<li>Inline comments should stand out less than anything else.</li>
<li>Code &#8220;commented out&#8221; should be nearly invisible.</li>
<li>But real in-code documentation should have strong emphasis and beauty.</li>
<li>Everything should be differentiated, including identifiers, keywords, 3-4 types of comments, strings, types, constants, conditionals, control structures, and more.</li>
<li>Strings should be a nice color since much documentation should exist in source code as strings (think &#8220;&#8221;" comments in python or /** in java).</li>
<li>Normal text should be colored either black or white so it is obvious if something is not recognized syntax.</li>
<li>No two used colors should be highly similar.  Beauty is secondary to contrast.</li>
<li>Each language will have some special syntaxes that need specific attention.  E.g., py, pl, sh, html, vim, rst, moin, mail, etc.  It&#8217;s helpful to have a variety of file types hanging around and fire up your editor on each of them for the scheme you&#8217;re developing/modifying.</li>
<li>The scheme should look nearly identical whether being used in an xterm or in a GUI.  E.g., looks the same in vim as gvim.</li>
<li>Really needs to support 256-colors.  There are just too many different highlights to try and cover in 16 colors.</li>
</ul>
<p>I&#8217;ve described the different types of comments in <a href="http://micahelliott.com/2008/12/many-types-of-code-comments">this related post</a>.</p>
<p>Have a look at <a href="http://www.vim.org/scripts/script_search_results.php?keywords=&amp;script_type=color+scheme&amp;order_by=rating&amp;direction=descending&amp;search=search">the repository of color schemes for vim</a>.  There is also a nice <a href="http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/">screencapture of the repository</a>.</p>
<p><a href="http://micahelliott.com/wp-content/uploads/2008/12/pythoncomments.patch"><a href="http://micahelliott.com/wp-content/uploads/2008/12/adobe21.png"><img class="aligncenter size-full wp-image-211" title="adobe2" src="http://micahelliott.com/wp-content/uploads/2008/12/adobe21.png" alt="adobe2" width="492" height="1171" /></a><br />
</a></p>
<p>Download my <a href="http://micahelliott.com/wp-content/uploads/2008/12/pythoncomments.patch">pythoncomments</a> patch to enable <a href="http://www.vim.org/scripts/script.php?script_id=790">python.vim syntax recognizer</a> (for v2.6.3, maybe already part of your Vim installation) to make use of the various features of this article.  The patch is not necessary, but helps with some comment highlighting.</p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2008/12/editor-color-scheme-philosophy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Many Types of Code Comments</title>
		<link>http://micahelliott.com/2008/12/many-types-of-code-comments/</link>
		<comments>http://micahelliott.com/2008/12/many-types-of-code-comments/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 07:00:43 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[checklist]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[ocd]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://micahelliott.com/?p=196</guid>
		<description><![CDATA[It&#8217;s amazing how many different purposes there are for code comments.  Most comments are treated the same by compilers/interpreters &#8212; ignored.  But humans have their own semantics based on some established conventions.  And &#8220;meta-processors&#8221; also do a lot with these; e.g., generating documentation, running tests, executing debug statements, locating tickets, assigning to variables, syntax highlighting [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s amazing how many different purposes there are for code comments.  Most comments are treated the same by compilers/interpreters &#8212; ignored.  But humans have their own semantics based on some established conventions.  And &#8220;meta-processors&#8221; also do a lot with these; e.g., generating documentation, running tests, executing debug statements, locating tickets, assigning to variables, syntax highlighting and checking, compiler diagnostics control, editor folding, hidden full-blown languages, and probably even more.  But the point of this post is to simply enumerate the common comment types.  I&#8217;m working on some syntax highlighting for <a href="http://www.vim.org">Vim</a> to make more semantic sense of these, particularly for Python code.</p>
<p><span id="more-196"></span></p>
<h2>Different Types of Comments</h2>
<p>Of course the code highlighting plugin this blog uses isn&#8217;t able to make much sense of these, but Vim can take it further with a little tweaking.</p>
<pre name="code" class="python"># look out for...
#print 'disabled
##print 'disabled'
for x in xs:  # iterate over xs
### King comment.
###print x
"""Multi-line chunk of commented-out code.  Sometimes only first sentence is significant."""
'''multi-line chunk of docstring'''
"string"
'string'
# TODO: add locking to...
######################################################################
#---------------------------------------------------------------------
# @param foo The metavar that never dies</pre>
<p>I&#8217;ll break these down by line number.</p>
<ol>
<li>is just a traditional comment that exists because something out of the ordinary is happening around the code.</li>
<li>a disabled line of code</li>
<li>another disabled line that is easier for a highlighter to treat.</li>
<li>an end-of-line comment; the most subtle form.</li>
<li>is a descriptive comment marking the purpose of a section of code.</li>
<li>a statement that only executes when in &#8220;debug mode&#8221;.  Perl&#8217;s &#8220;smart comments&#8221; are the only facility I&#8217;m aware of that uses this, but I think they&#8217;re pretty clever.</li>
<li>a formal piece of documentation, usually spanning multiple lines.</li>
<li>a simple way to comment out a large chunk of code.</li>
<li>just a string</li>
<li>same as 7; probably should not be differentiated, but some people prefer to the &#8220;dirk&#8221; version whenever possible.</li>
<li>a codetag (a controversial convention many use to refer to items that should (or do) have tracker tickets associated; described in <a href="http://www.python.org/dev/peps/pep-0350/">PEP 350</a>).</li>
<li>a break in major section of the file.</li>
<li>a minor section break.</li>
<li>a &#8220;javadoc&#8221;-style piece of documentational markup.  Also available with <a href="http://epydoc.sourceforge.net/manual-fields.html#epydoc-fields">Epydoc</a>.</li>
</ol>
<h2>View From Vim</h2>
<p>For a more visual example, here&#8217;s a screenshot showing the best I can make Vim do today.  Featuring the <a href="http://www.vim.org/scripts/script.php?script_id=1365">Adobe color theme</a>, tokenized by <a href="http://www.vim.org/scripts/script.php?script_id=790">python.vim</a>.</p>
<p><img class="aligncenter size-full wp-image-204" title="vim1" src="http://micahelliott.com/wp-content/uploads/2008/12/vim11.png" alt="vim1" width="492" height="523" /></p>
<p>It is certainly within reach to make Vim, emacs, and probably many other editors make use of these semantics in their syntax highlighting.  That color scheme (hacked up for this display) is not (yet) perfect, but it does the job of showing most of the differentiation.  If there are so many purposes for the different comments, shouldn&#8217;t your editor make those differences obvious?</p>
<p>I&#8217;ll offer more details about getting this working, and the value of highly differentiated syntax, and what makes a good color scheme, in a near-future post.</p>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2008/12/many-types-of-code-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some gnome-terminal Power Tips</title>
		<link>http://micahelliott.com/2008/12/some-gnome-terminal-power-tips/</link>
		<comments>http://micahelliott.com/2008/12/some-gnome-terminal-power-tips/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 19:24:00 +0000</pubDate>
		<dc:creator>Micah</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[kiss]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.micahelliott.com/?p=76</guid>
		<description><![CDATA[If I&#8217;m going to have a productive day, it usually means spending it in a shell. I use GNOME Terminal as my xterm clone of choice, simply because it&#8217;s a default. If you don&#8217;t know what terminal you&#8217;re using, it&#8217;s probably gnome-terminal if you&#8217;re running GNOME. I recently started making some productivity tweaks to my [...]]]></description>
			<content:encoded><![CDATA[<p><em>If I&#8217;m going to have a productive day, it usually means spending it in a shell.  I use <a href="http://en.wikipedia.org/wiki/GNOME_Terminal">GNOME Terminal</a> as my xterm clone of choice, simply because it&#8217;s a default.  If you don&#8217;t know what terminal you&#8217;re using, it&#8217;s probably <span style="font-family: courier new;">gnome-terminal</span> if you&#8217;re running GNOME.  I recently started making some productivity tweaks to my setups that I thought were worth sharing.</em></p>
<p><em><img class="alignleft size-full wp-image-147" title="taskbar" src="http://micahelliott.com/wp-content/uploads/2008/12/taskbar.png" alt="taskbar" width="178" height="34" /><br />
</em></p>
<p><em><br />
</em></p>
<p><span id="more-76"></span></p>
<p>I do most of my development work (bash, ipython, vim) in a terminal.  Some of it involves working remotely on other machines, and demonstrating things for others (e.g., pair programming).  I need different setups for each of these.  I spend most of my time hacking away in a local shell, so for that I want optimized font, color, size, etc.  Then when I share I need to make the font way bigger.  And when I&#8217;m on a different machine I like to have a different color window (in addition to a custom prompt color) so I don&#8217;t forget where I am.  So those are the three basic tweaks that are critical for most people.  You can probably make those tweaks with most xterm-clones.</p>
<p>I&#8217;ll assume you&#8217;re using <a href="http://www.gnome.org/">GNOME</a> already.  You can get a feel for the gnome-terminal feature set by simply firing up an instance: <span style="font-style: italic;">Applications -&gt; Accessories -&gt; Terminal</span>.  But I suggest you right-click it instead, and &#8220;<span style="font-style: italic;">Add this launcher to Panel</span>&#8220;.  In fact, do that a few times; we&#8217;ll customize each differently.</p>
<p>Now from an open instance, you can explore the options by invoking:</p>
<p><span style="font-family: courier new;"> $ gnome-terminal &#8211;help</span></p>
<h2>Profiles</h2>
<p>There are profiles.  Create a few.  This is pretty important.  If you&#8217;ve only got a &#8220;Default&#8221; profile, every time you change it, you&#8217;ll affect every other open window.</p>
<h2>Font</h2>
<p>I&#8217;m very picky about having the tiniest font that will work.  I can actually look at 380 lines of code at a time on a humble (1920&#215;1200) 15&#8243; laptop screen.  To achieve this I have to go with a non-antialiased (bitmap?) font.  The generically named &#8220;Monospace-7&#8243; is not beautiful, but works well for optimizing screen real estate.  It&#8217;s also the only bitmap font I&#8217;ve seen that renders italic/oblique well.</p>
<p>Monospace is also the only font I&#8217;ve seen able to scale down to 6-point and render readably.  Try it &#8212; pretty amazing!  I can now look at 570 lines of code (if I cheat and narrow the last window a bit) in 15&#8243;! I&#8217;ve got great near vision, but I have to be really close to the screen to read it at 6, so I&#8217;ll go back to 7.  You could also easily install other more appealing bitmap fonts like Terminus (<span style="font-family: courier new;">apt-get install xfonts-terminus</span>).  In fact, terminus at 8-point fits the same number of characters as Monospace at 7-point.  Too bad Terminus doesn&#8217;t do 6!</p>
<p>Remember to stop all running gnome-terminal instances to get a new font to show up in the list.</p>
<h2>CLI Options</h2>
<p>Customize the CLI options with <span style="font-style: italic;">right-click</span>, <span style="font-style: italic;">Properties</span>.  Look at the <span style="font-style: italic;">Command</span> field and start adding options there.  The first I like to add is <span style="font-family: courier new;">&#8211;geometry=80&#215;50</span> to set the window size; the default of 80&#215;25 is always too small.  I like to start out with a meager 80 columns to make it obvious when I&#8217;m exceeding the <a href="http://www.sowbug.org/mt/2005/07/join-the-80column-camp.html">good</a> <a href="http://www.python.org/dev/peps/pep-0008/">old</a> <a href="http://ask.slashdot.org/article.pl?sid=07/07/07/1931246">rule</a>.   Of course I often widen manually if I&#8217;m not in code.</p>
<h2>Automatic Remote Login</h2>
<p>My favorite trick is to automate logging in to remote machines.  It&#8217;s as simple as adding another option: <span style="font-family: courier new;">&#8211;execute ssh YOU@SOMEHOST</span></p>
<h2><em><img class="aligncenter size-full wp-image-146" title="xterm2" src="http://micahelliott.com/wp-content/uploads/2008/12/xterm2.png" alt="xterm2" width="502" height="213" /></em></h2>
]]></content:encoded>
			<wfw:commentRss>http://micahelliott.com/2008/12/some-gnome-terminal-power-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

