<?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>Entangled discussions &#187; Programming</title>
	<atom:link href="http://www.glenstark.net/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.glenstark.net</link>
	<description>Let's talk about the fundamental interconnectedness of all things...</description>
	<lastBuildDate>Fri, 18 Jun 2010 13:37:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Java gripes</title>
		<link>http://www.glenstark.net/2010/06/java-gripes-2</link>
		<comments>http://www.glenstark.net/2010/06/java-gripes-2#comments</comments>
		<pubDate>Tue, 08 Jun 2010 09:02:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[proprietary]]></category>
		<category><![CDATA[yapl]]></category>

		<guid isPermaLink="false">http://www.glenstark.net/?p=159</guid>
		<description><![CDATA[I&#8217;m not a big fan of YAPL&#8217;s (Yet Another Proprietary Language), so I&#8217;m biased.  I will say that Java is much better than VB, and it&#8217;s probably a good choice for a lot of applications, but it suffers from the cultural and design flaws that always seem to crop up in proprietary languages.  I blame [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a big fan of YAPL&#8217;s (Yet Another Proprietary Language), so I&#8217;m biased.  I will say that Java is much better than VB, and it&#8217;s probably a good choice for a lot of applications, but it suffers from the cultural and design flaws that always seem to crop up in proprietary languages.  I blame marketing.  The marketing departments of the companies promoting their YAPL&#8217;s foster tribalism among programmers.  I.E. they encourage programmers to identify themselves as   &#8220;I&#8217;m a YAPL-X programmer.  YAPL-Y programmers suck&#8221;.  It&#8217;s kinda like the console wars:  retarded.  The correct behaviour is to isolate the best language for a particular task, based on the constraints you are working under.     This leads  to frustrating books, articles, blog entries and forum posts, with people attacking and defending their particular YAPL, rather than discussing the technical issues as neutrally as possible.  This leads to a high noise to signal ratio when you&#8217;re trying to figure things out.</p>
<p>For example, I wanted to use Java SAX (Simple API for XML) for a very simple application.  Using google to search for tutorials or what not gets you really out of date information.  For example, the top hit for &#8220;Java SAX&#8221; gets you<a href="http://www.saxproject.org/"> www.sasxproject.org</a>, which would seem promising, but it was last updated in 2004.  Much of the methods have changed, as have the include paths, as have the status of the libraries, etc. etc.  The official JavaDoc documentation is up to date, which is better than nothing, but it&#8217;s not a very efficient starting point.</p>
<p>As another example, consider the problem of converting a byte array to a string representation and back.  As of the date of this posting, entering &#8220;java convert byte array to string&#8221; into google gets you the following link</p>
<p>Googling &#8220;java byte array to string and back&#8221; gives you <a href="http://www.java-forums.org/new-java/5761-bytearray-string-conversion.html">this </a>as the number one link.  When I hit that link I got an ad with sound, and of course there&#8217;s no information on how to solve the problem.  Someone has posted a clue, which may be accurate, that when calling new String(byteArray) it&#8217;s actually Object.toString that&#8217;s being called -&gt; i.e. loss of information.  Ok, that&#8217;s cool, but how to get the desired effect?  Not only that, but if the responder is correct, that says very bad things about all the information arrived at by &#8220;java convert byte array to string&#8221;.</p>
<p>I wonder whas going to happen now that Oracle has aquired Sun&#8217;s holdings.  Franckly I&#8217;m not particularly hopeful, but in the absence of data I attempt to remain neutral.</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.glenstark.net%2F2010%2F06%2Fjava-gripes-2&amp;t=Java%20gripes" id="facebook_share_link_159">Share on Facebook</a>
	<script type="text/javascript">
	var button = document.getElementById('facebook_share_link_159') || document.getElementById('facebook_share_icon_159') || document.getElementById('facebook_share_both_159') || document.getElementById('facebook_share_button_159');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_159') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://www.glenstark.net/2010/06/java-gripes-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My thoughts on Windows 7</title>
		<link>http://www.glenstark.net/2010/02/my-thoughts-on-windows-7</link>
		<comments>http://www.glenstark.net/2010/02/my-thoughts-on-windows-7#comments</comments>
		<pubDate>Sun, 14 Feb 2010 14:04:58 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.glenstark.net/?p=277</guid>
		<description><![CDATA[I recently installed Windows 7 on my home PC, and thought I would share my observations with anyone who is interested. For those of you who are unfamiliar with me, I&#8217;m primarily a Linux user, and go to pretty extreme efforts to use Linux for pretty much everything. On rare occasion however, I find it [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed Windows 7 on my home PC, and thought I would share my observations with anyone who is interested.</p>
<p>For those of you who are unfamiliar with me, I&#8217;m primarily a Linux user, and go to pretty extreme efforts to use Linux for pretty much everything.  On rare occasion however, I find it necessary to boot into windows for a work related reason (generally becuase of people using proprietary file formats that I can&#8217;t open in Linux, although this is getting rarer and rarer.  More often I boot into Windows because I want to play video games.</p>
<p>I did my install thusly:  I purchased a new 1TB hard drive for all things windows.  It&#8217;s probably way more than I need, but I thought it would be nice to have the space to just install all my video games, and not worry about how much drive space I have.  Hard drive space has become so bloody cheap.  I then installed Win 7 on the new drive, and because Microsoft can&#8217;t imagine anyone using any OS besides theirs, I had to use a Linux rescue disk to reinstall grub on the mba.   It&#8217;s a quick process, but it&#8217;s just typical Microsoft arrogance, and I had to dig around to find the rescue disk.</p>
<p>Of all the things I&#8217;m going to complain about, none of them are surprising.  They are all the typical bitches I have about Microsoft, and about software developed for Microsoft OS&#8217;s.  I see the failures as usually coming from one of two sources:  1) marketing to the least common denominator -&gt; i.e. they try to make the software pleasant for dumb asses, as opposed to rewarding people who take the time to learn, or try to learn, how to use the tools efficiently.  This leads to fundamentally inefficient and unwieldy tools&#8230; and 2) Sheer fucking arrogance.</p>
<p>Okay, so now I can boot into Win 7.  One of the reasons I upgraded is I was gradually getting to the point where many of the drivers of software I want to use aren&#8217;t supported, or don&#8217;t work on XP.  My laptop came with Vista, so I tried it out for a few weeks, but I got so fucking annoyed at, I just wiped the windows partition from my laptop altogether.  It&#8217;s now a linux only box.  I did try to install Win 7 on the laptop, but guess what!  Win 7 can&#8217;t recognize my GeForce GO graphics card as Sony has apparently done something non-standard with it, and won&#8217;t support any OS other than Vista on that model.  So I can use my graphics acceleration correctly under Linux, but not Windows 7.  That is absolutely abysmal.</p>
<p>Okay, so what, my main gaming machine is desktop, so let&#8217;s install it on there.  Apparently it recognized my Cre</p>
<p>ative Sound Blaster card, and downloaded some driver for it off the net (without asking me), and then crashed and burned, so I had to dig out the original install disk to get my sound card working.  That&#8217;s par for the course with Microsoft products, so fuck it, what am I complaining about.</p>
<p>That&#8217;s my biggest bitch about Microsoft products:  The usual litany of bullshit that they have been heaping on us for so long that most users just take it for granted and don&#8217;t even think to complain about it.   Of course Microsoft still hasn&#8217;t figured out how to install an OS without rebooting multiple times.   Of course Microsoft gets to decide when to reboot your computer by default.  Of course some application developer can decide to just reboot your fucking machine for you after an install.  Why the fuck would you want to make those kind of decisions yourself?  It&#8217;s not like you were doing anything important when we rebooted right?  Microsoft and the developer culture around Microsoft makes it basically impractical to try to do anything with your computer while installing or doing any kind of system administration.  Fuckers.</p>
<p>But of course I expect all of that Bullshit.  I even expect the computer to come pre set up with a bunch of fucking folders that I don&#8217;t want, organized in a way I don&#8217;t like.  Microsoft would never dream of letting users set things the way they like.  Microsoft knows how you should organaize your data better than you.  What I had hoped would be corrected in Windows 7 over Vista, was the interminable waiting for the OS to do some trivial fucking function, like delete a folder, search for a file, or whatever.  You know, the shit that should take about a millisecond for a computer to accomplish, that is part of your daily PC work?  I can&#8217;t tell you how many times I had to sit and wait for<strong> mintues</strong> for Vista to delete, open, or move a folder.  It&#8217;s just fucking intrusive, and kills my productivity or enjoyment.  So how&#8217;d Microsoft do with all that?</p>
<p>Okay, I&#8217;ll grant, it seems a little better.  I&#8217;m not screaming in frustration as much as I was in Vista, but it&#8217;s still worse than XP.  So my grade for 7 is:  SAD.  It&#8217;s sad that the best Microsoft could do was to make the user experience for 7 half as bad as they had for Vista (by comparison to XP which is nothing to brag about either).  It&#8217;s sad that even though Microsoft works with all these hardware vendors, and these hardware vendors design and test their shit for windows systems, but it&#8217;s still faster to get my system set up in linux than in Windows.  It&#8217;s sad that people are raving about how great 7 is because it&#8217;s an improvement over Vista.  They need a better basis for comparison.</p>
<p>Here&#8217;s an example:  I go into my XP drive to copy some game same files over.  First folder I check, I&#8217;m told I don&#8217;t have the permissions to access that folder.  Do I want to get them?  Yeah I fucking want to get them.  Okay, I&#8217;m willing to grant that this might serve a security purpose.  For example  I have to log in as root to access someone else&#8217;s folder in Linux.  That&#8217;s a good idea.  But do I have to put in a root password?  No.  It&#8217;s just a waste of time.  But whatever.     The real problem is it took win 7 almost <strong>2.5 minutes</strong> to get permission to access the folder.  Seriously, <strong>WTF? </strong>There&#8217;s no excuse for that.  If I were on the team responsible for that piece fo shit, I&#8217;d be ashamed to put it on my resume.  As I type this, I&#8217;m waiting nearly 20 minutes for CoD4 to install Microsoft DirectX for Windows.  Why?  How can this possibly take so long?  I decide that something must have gone wrong, so I click cancel, and lo and behold when I start CoD everything is ready to go.  It just hung for some damn reason.  While I&#8217;m discussing DirectX, why is it that something like 80% of the games I install install DirectX again.  Over and damn over, the same damn version of direct X.  Is it because the programmers are too laze to write code to check if DX is already installed?</p>
<p>Here&#8217;s another great example.  After my clean install and after one of the automatic reboots, I was surprised to find a Creative Sound Blaster logo on my screen, along with a promt whether or not I want to install drivers.  I&#8217;m thinking &#8220;Awesome&#8221;, until after several minutes the process crashes and reboots my computer.  Slightly miffed, I dig out the install disk for the drivers and try that:  BSOD.   Now let me say, that&#8217;s fucking pathetic.  BSOD on a driver install on an otherwise clean install of Windows?  <strong>WTF</strong>?  You assholes should be fucking ashamed of yourself.   So I go to Creative&#8217;s site to download the right drivers&#8230; lets see what happens&#8230; I better save this post in case it BSOD&#8217;s during install.  Several minutes for the driver install  (WHY?)&#8230; should I make a tee?  What if it reboots, I&#8217;ll miss the error message&#8230;  Joy!  Installation completed successfully.  It asks me if I want to restart now&#8230;  I decide to see if i can play CoD with sound or not, and will reboot only if necessary.  So I start CoD and it promts me to install Microsoft DirectX&#8230; Again?  Why?  WTF?  I actually RAN CoD just five minutes ago, and now I have install more DirectX stuff?  Probably some audio components&#8230;  But still now sound, so let&#8217;s reboot again.  How many reboots is that until I can actually play a game?  At least 5, and that&#8217;s not counting the BSOD&#8217;s.  Count them and it&#8217;s more like 10.  No wonder PC gaming is so much less popular than console gaming.</p>
<p>So I reboot, and then there&#8217;s a whole monitor covered with Creative marketing crap.  It tells me that I should check for updates.  But I just downloaded the drivers from Creative&#8217;s web site, surely they are up to date?  Well, let&#8217;s check.  It will surely come as no surprise to you that indeed there were critical updates for my drivers, which I had not 5 minutes ago downloaded from Creative&#8217;s site.  That this is no surprise tells you how much Microsoft&#8217;s Customers should better be called Microsoft&#8217;s Bitches.   And guess what I have to do as soon as the updates are installed?  Yeah, you got it, reboot again.</p>
<p>Another full screen marketing assault from Creative tells me I really ought to register my product.  What the fuck is my serial number?  Ignoring them I notice that Steam has finished downloading fallout 3, and I think &#8220;hey, I bet this&#8217;ll give me more to bitch about in my blog&#8221;, so try running that.  Guess what it has to do?  Yeah, that&#8217;s right, install direct X.  Then it has to install some other crap, and when it reaches &#8220;Microsoft .NET Framework 3.0 x86 Setup&#8221; it tells me I must use &#8220;Turn Windows Features on or off&#8221; in the Control Panel to install or configure Microsoft .NET Framework 3.0 x86&#8243;.</p>
<p>Anyways, I finally got it running well enough to play a game or two.  I have more issues with my soundblaster card on windows than i do in Linux.  So I gotta say, Windows is harder to get working than Linux.  Big day.</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.glenstark.net%2F2010%2F02%2Fmy-thoughts-on-windows-7&amp;t=My%20thoughts%20on%20Windows%207" id="facebook_share_link_277">Share on Facebook</a>
	<script type="text/javascript">
	var button = document.getElementById('facebook_share_link_277') || document.getElementById('facebook_share_icon_277') || document.getElementById('facebook_share_both_277') || document.getElementById('facebook_share_button_277');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_277') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://www.glenstark.net/2010/02/my-thoughts-on-windows-7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gecko&#8217;s Guide to GIT</title>
		<link>http://www.glenstark.net/2009/09/geckos-guide-to-git</link>
		<comments>http://www.glenstark.net/2009/09/geckos-guide-to-git#comments</comments>
		<pubDate>Wed, 23 Sep 2009 12:48:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.glenstark.net/?p=81</guid>
		<description><![CDATA[I&#8217;ve convinced my work colleagues over at Gecko-Research to start using Git.  I&#8217;m a git neophyte myself, but now I&#8217;m in the position of setting up our Git repository, and teaching my colleagues how to use it. I&#8217;ve written up a little guide to using Git, aimed as a reference for myself and my colleagues.   [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve convinced my work colleagues over at <a href="http://gecko-research.html">Gecko-Research</a> to start using Git.  I&#8217;m a git neophyte myself, but now I&#8217;m in the position of setting up our Git repository, and teaching my colleagues how to use it. I&#8217;ve written up a little guide to using Git, aimed as a reference for myself and my colleagues.   As such, it&#8217;s just a list of the commands that we use on a regular basis, or the situations we are often confronted with (and how to deal with them).  The post is totally a work in progress, so it will likely change quite a bit over the next few months as I flesh it out as needs arise.</p>
<p>If you are interested in a general introduction to git, or a tutorial, I would suggest one of the following:</p>
<ul>
<li><a href="pheredev.org/wiki/Git_for_the_lazy">Git for the lazy</a>.</li>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html">Git Tutorial</a></li>
<li><a href="http://video.google.com/videoplay?docid=-3999952944619245780#">Google Tech talk on Git</a></li>
</ul>
<p>Git has a reputation for being difficult to use, or counter intuitive, but I think that&#8217;s just due to it being a distributed rather than central revisioning system (based on the concept of a central repository).  Some things do get tricky, but I think it&#8217;s primarily because git lets you work in new ways that can potentially trip you up.</p>
<p>Central repository systems are easy to conceptualize,  and they&#8217;re what people of our generation are used to, so they are easy to get started with.  Git  is based on a distributed model, in which each repository is equal (we can assign different roles to different repositories, but it&#8217;s not technologically imposed).    Considering that distributed systems are so becoming the norm (bittorrent, wikipedia, the free software movement, multi core computing, creative commons, blogging, twitter&#8230;) ,  I suspect tech heads growing up now will find thinking in a distributed way as simple as we old farts find the top-down, central-repository, client-server model.</p>
<h2>Daily Use</h2>
<p>Note that these comments are aimed at my colleagues.  Your work situation may vary.</p>
<h3>commiting</h3>
<p>You should commit your work whenever you get anything done that can easily be summed up in one line (the commit message).  There are other reasons to commit, so when in doubt, do a commit.  It&#8217;s easy to go back if you need to.  Committing doesn&#8217;t go on the net, it just tells your local git repository that you got some work done, and puts those changes onto the local index (git&#8217;s database of what&#8217;s what).  Frequent commits will save you hassles.  The command is:</p>
<pre> git commit -a</pre>
<p>The -a tells git to commit all modified files (which are being tracked).  You can also just commit specific files by using</p>
<pre> git commit &lt;list of files&gt;</pre>
<h3> more to come&#8230; </h3>
<h2>Configuration</h2>
<h3>gitignore file:</h3>
<p>A gitignore file specifies intentionally untracked files that git should ignore.  It concerns files that are not tracked by git, and that you don&#8217;t want to track with git, so temporary files, results of compilation, compled documentation, etc.  The man page is <a href="http://www.kernel.org/pub/software/scm/git/docs/gitignore.html">here</a>.  When git is determining what files to ignore it:</p>
<ol>
<li>Checks for a relevant command line option</li>
<li>Check patterns from a .gitignore file in the same directory as the path, or in any parent directory.</li>
<li>Check for patterns in $GIT_DIR/info/exclude</li>
<li>Check for patterns in the configuration variable core.excludesfile</li>
</ol>
<p>The man page describes the patterns, which are anyway pretty close to the usual *nix conventions that you&#8217;ll probably just get them right.  As an example, here&#8217;s my <code>.gitignore</code> file for a netbeans project:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*</span>.class
<span style="color: #000000; font-weight: bold;">*</span>~
build<span style="color: #000000; font-weight: bold;">/</span>
javadoc<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>This tells git to ignore any build or javadoc directories, as well as emacs temporary files.  Taking the time to setup a .gitignore file when you are starting a new project with git will make everything else more convenient down the line.</p>
<h3>Collaboration: tracking multiple branches</h3>
<p>Because of some wonky security policies on our institute&#8217;s network, we can&#8217;t directly push and pull from each other, so we go over a central repository.  Many of us work on multiple machines, so we want to use the central repository as a convenience tool for synching up between our machines, but we don&#8217;t necessarily want out colleagues pulling our work-in-progress.  The solution is for each of us to have our own branch.  This <a href="http://www.zorched.net/2008/04/14/start-a-new-branch-on-your-remote-git-repository/">post</a> tells us how to start a new branch on a remote git repository.  The steps are basically:</p>
<ol>
<li> Create a remote branch.  This can be done with the command
<pre> git push origin origin:refs/heads/new_feature_name</pre>
<p>(assuming your remote repository is called origin).</li>
<li>Make sure everything is up to date with
<pre> git fetch origin</pre>
</li>
<li>Start tracking the new branch with
<pre> git checkout --track -b new_feature_name origin/new_feature_name</pre>
</li>
<li>Make sure everything is up to date by doing a pull.
<pre>git pull</pre>
</li>
</ol>
<p>The third command,</p>
<pre> git checkout --track -b new_branch origin/new_feature_name</pre>
<p>is one you&#8217;ll run several times, every time you clone a repository somewhere, you&#8217;ll want to use to track all the various branches you are interested in.  That way you can checkout your colleagues (or bug fix) branches when you like, and merge them into your work whenever it is useful.</p>
<h2>Situations</h2>
<p><strong>Deleting a branch. </strong>Okay, so you&#8217;ve been branching all over the place, and now you realize you have some dead hanging branches you really don&#8217;t want cluttering up your repository anymore.   To get rid of a branch on the remote repository, you&#8217;ll want to do the following:</p>
<pre>git push origin :head/branch_to_delete</pre>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.glenstark.net%2F2009%2F09%2Fgeckos-guide-to-git&amp;t=Gecko%27s%20Guide%20to%20GIT" id="facebook_share_link_81">Share on Facebook</a>
	<script type="text/javascript">
	var button = document.getElementById('facebook_share_link_81') || document.getElementById('facebook_share_icon_81') || document.getElementById('facebook_share_both_81') || document.getElementById('facebook_share_button_81');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_81') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://www.glenstark.net/2009/09/geckos-guide-to-git/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs over terminal to dreamhost, 5C and 5D instead of forward-word and backward-word</title>
		<link>http://www.glenstark.net/2009/05/emacs-over-terminal-to-dreamhost-5c-and-5d-instead-of-forward-word-and-backward-word</link>
		<comments>http://www.glenstark.net/2009/05/emacs-over-terminal-to-dreamhost-5c-and-5d-instead-of-forward-word-and-backward-word#comments</comments>
		<pubDate>Mon, 04 May 2009 12:05:03 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.glenstark.net/?p=112</guid>
		<description><![CDATA[I&#8217;ve been unable to use the C-rightarrow and C-leftarrow to get forwad word and backward word behavior when using emacs within a ssh to my dreamhost host.  I finally figured out how to fix the problem.  In my .emacs file: &#40;global-set-key &#34;\M-[1;5C&#34; 'forward-word&#41; ; Ctrl+right-&#62;forward word &#40;global-set-key &#34;\M-[1;5D&#34; 'backward-word&#41;; Ctrl+left-&#62; backward word You might be interested in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been unable to use the C-rightarrow and C-leftarrow to get forwad word and backward word behavior when using emacs within a ssh to my dreamhost host.  I finally figured out how to fix the problem.  In my .emacs file:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\M</span>-[1;5C&quot;</span> 'forward-word<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">; Ctrl+right-&gt;forward word</span>
<span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\M</span>-[1;5D&quot;</span> 'backward-word<span style="color: #66cc66;">&#41;</span><span style="color: #808080; font-style: italic;">; Ctrl+left-&gt; backward word</span></pre></div></div>

<p>You might be interested in my entire .emacs file, which adds a few niceties:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>set-background-color <span style="color: #ff0000;">&quot;light grey&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>global-font-lock-mode <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>transient-mark-mode <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> default-tab-width <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span><span style="color: #808080; font-style: italic;">;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> standard-indent <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span><span style="color: #808080; font-style: italic;">;</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">setq</span> inhibit-startup-message t<span style="color: #66cc66;">&#41;</span><span style="color: #808080; font-style: italic;">;</span>
<span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\M</span>-[1;5C&quot;</span> 'forward-word<span style="color: #66cc66;">&#41;</span>     <span style="color: #808080; font-style: italic;">; Ctrl+right-&gt;forward word</span>
<span style="color: #66cc66;">&#40;</span>global-set-key <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\M</span>-[1;5D&quot;</span> 'backward-word<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">; Ctrl+left -&gt;backward word</span></pre></div></div>

<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.glenstark.net%2F2009%2F05%2Femacs-over-terminal-to-dreamhost-5c-and-5d-instead-of-forward-word-and-backward-word&amp;t=Emacs%20over%20terminal%20to%20dreamhost%2C%205C%20and%205D%20instead%20of%20forward-word%20and%20backward-word" id="facebook_share_link_112">Share on Facebook</a>
	<script type="text/javascript">
	var button = document.getElementById('facebook_share_link_112') || document.getElementById('facebook_share_icon_112') || document.getElementById('facebook_share_both_112') || document.getElementById('facebook_share_button_112');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_112') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://www.glenstark.net/2009/05/emacs-over-terminal-to-dreamhost-5c-and-5d-instead-of-forward-word-and-backward-word/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Fedora as a local webserver</title>
		<link>http://www.glenstark.net/2009/04/setting-up-fedora-as-a-local-webserver</link>
		<comments>http://www.glenstark.net/2009/04/setting-up-fedora-as-a-local-webserver#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:00:49 +0000</pubDate>
		<dc:creator>Glen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.glenstark.net/?p=55</guid>
		<description><![CDATA[I&#8217;ve recently had to set up a couple of fedora installations as a web server, for the purpose of testing some PHP scripts (for example a Zen Cart install). It&#8217;s pretty trivial, but each time I wasted time remembering what it was I had to do.  Now that I&#8217;ve written this,  I doubt I&#8217;ll forget [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently had to set up a couple of fedora installations as a web server, for the purpose of testing some PHP scripts (for example a Zen Cart install).   It&#8217;s pretty trivial, but each time I wasted time remembering what it was I had to do.  Now that I&#8217;ve written this,  I doubt I&#8217;ll forget again.  Oh well.</p>
<p>So here&#8217;s what you have to do:</p>
<ol>
<li>Install PHP if it&#8217;s not there yet (yum install php)</li>
<li>Start (or restart) httpd (service httpd restart).</li>
<li>Put yer content into your systems html directory.  On Fedora that&#8217;s var/www/html</li>
<li>You can now view the web content in your browser at http://localhost/</li>
</ol>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.glenstark.net%2F2009%2F04%2Fsetting-up-fedora-as-a-local-webserver&amp;t=Setting%20up%20Fedora%20as%20a%20local%20webserver" id="facebook_share_link_55">Share on Facebook</a>
	<script type="text/javascript">
	var button = document.getElementById('facebook_share_link_55') || document.getElementById('facebook_share_icon_55') || document.getElementById('facebook_share_both_55') || document.getElementById('facebook_share_button_55');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_55') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://www.glenstark.net/2009/04/setting-up-fedora-as-a-local-webserver/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The productive programmer</title>
		<link>http://www.glenstark.net/2008/09/the-productive-programmer</link>
		<comments>http://www.glenstark.net/2008/09/the-productive-programmer#comments</comments>
		<pubDate>Tue, 09 Sep 2008 08:15:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.glenstark.net/?p=19</guid>
		<description><![CDATA[Just checked out a pretty fantastic book, The Productive Programmer by Neil Ford. I&#8217;m only about half-way through it, but so far I find it fantastic.  I read it at night before going to bed.  This speaks of its readability, but it&#8217;s a bad strategy, since I get excited while reading it and want to [...]]]></description>
			<content:encoded><![CDATA[<p>Just checked out a pretty fantastic book, <a href="http://www.amazon.com/gp/product/0596519788?ie=UTF8&amp;tag=wwwglenstarkn-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596519788">The Productive Programmer</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=wwwglenstarkn-20&amp;l=as2&amp;o=1&amp;a=0596519788" border="0" alt="" width="1" height="1" /> by Neil Ford.<br />
<a href="http://www.amazon.com/gp/product/0596519788?ie=UTF8&amp;tag=wwwglenstarkn-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596519788"><img src="http://www.glenstark.net/wp-admin/61dx4Iu-fyL._SL110_.jpg" border="0" alt="" /></a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=wwwglenstarkn-20&amp;l=as2&amp;o=1&amp;a=0596519788" border="0" alt="" width="1" height="1" /><br />
I&#8217;m only about half-way through it, but so far I find it fantastic.  I read it at night before going to bed.  This speaks of its readability, but it&#8217;s a bad strategy, since I get excited while reading it and want to try things out.  Every night for the last three nights I&#8217;ve said to Bettina &#8220;man, I wish I&#8217;d read this book years ago&#8221;.</p>
<p>It&#8217;s obviously aimed at the developer, but I think about 40% of the tips in it are relevant to Bettina, who is a school teacher.  The thesis of the book can be summarized as follows:  The GUI makes things easier for a computer neophyte, but less efficient for the power user.  As programmers, a major part of our work is data entry (we form the data in our heads, but it&#8217;s gotta get into the computer).  So it behooves to put a little effort into making the data entry part more efficient.</p>
<p>He discusses various repetitive, boring tasks that chew up our time and attention, and then gives tricks to improve your efficieny, on windows, mac, and Linux based systems.  He also discusses good algorithms for figuring out how much time to spend automating problems, and how not to shave yaks.</p>
<p>Me personally, I would expand his thesis to include end users.  How much time do you spend working with your computer?  Bettina is a school teacher and she spends at least 20 hours a week on the damn thing.  Me I spend like 60.  I think 20 is about minimum for anyone who works with a computer at all.  So I think we&#8217;d all benefit from learning better computer work habits.  Because the author writes to programmers however, he rightfully assumes a certain amount of computer savy.  This might make the book unnaproachable for less technically literate users.  I have a hard time judging that.  But if you think you can read it, I highly recommend it.</p>
<p>It&#8217;s also inspired me to start posting the most useful productivity tips that I run across, so look forward to that.  Does anyone know of an existing blog that specializes in programmer-productivity tips (I&#8217;m not talking language stuff here, just computer-human interaction)?</p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.glenstark.net%2F2008%2F09%2Fthe-productive-programmer&amp;t=The%20productive%20programmer" id="facebook_share_link_19">Share on Facebook</a>
	<script type="text/javascript">
	var button = document.getElementById('facebook_share_link_19') || document.getElementById('facebook_share_icon_19') || document.getElementById('facebook_share_both_19') || document.getElementById('facebook_share_button_19');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_19') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://www.glenstark.net/2008/09/the-productive-programmer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
