<?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>The Code Dojo &#187; Coding</title>
	<atom:link href="http://dojo.codegreene.com/tag/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://dojo.codegreene.com</link>
	<description>The Code Dojo is the veritable repository of random musings from the development team at Code Greene.</description>
	<lastBuildDate>Fri, 03 Sep 2010 19:30:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Well-known problems with undocumented solutions</title>
		<link>http://dojo.codegreene.com/2010/well-known-problems-with-undocumented-solutions/</link>
		<comments>http://dojo.codegreene.com/2010/well-known-problems-with-undocumented-solutions/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:23:02 +0000</pubDate>
		<dc:creator>Mac</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=551</guid>
		<description><![CDATA[I just spent about an hour banging my head on a brick wall with the apparently well known &#8220;Unable to create selectable TCP socket&#8221; problem, which manifests itself most notably with failing imap_open() calls from PHP. It is related to fd_setsize and a frequent limit of 1024 open files (or at least selectable open files). [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent about an hour banging my head on a brick wall with the apparently well known &#8220;Unable to create selectable TCP socket&#8221; problem, which manifests itself most notably with failing imap_open() calls from PHP. It is related to fd_setsize and a frequent limit of 1024 open files (or at least selectable open files). It is quite well documented that it is some kind of bug/shortcoming in the c-client libraries that underlie a lot of email-related stuff, particularly the UW suite of tools like uw-imap, pine, alpine, etc. as well as the IMAP extension in PHP. I love being able to go Google for answers and find a ton of related content. It is really annoying though when people have been talking about this bug for years, since at least early 2007, with very very few workable solutions posted, or even workarounds.</p>
<p>So, I&#8217;m going to do my part: I found a workaround that I think might work very well for a lot of people who run into this problem. It&#8217;s biggest advantage is that it is very very easy to try, and has almost no downside, even if it doesn&#8217;t work for your particular situation. In my case, I found that Apache did indeed have a lot of files open, including log files for all my VirtualHosts, all the libraries that httpd depends on, files from sites that are hosted there (though it seems to open and close those just fine), and a large buildup of hundreds of entries for /tmp that were open and apparently never got closed properly. In my case, the server in question has an uptime of over 2 years, and while &#8220;apachectl restart&#8221; runs at least daily for log rotation, it seems that doesn&#8217;t really close unused file descriptors. The workaround I discovered was running &#8220;apachectl stop&#8221; followed by &#8220;apachectl start&#8221; which fixed the problem completely for me, at least for the next year or two I hope. From over 1600 open files, after restarting Apache fully that way, it only reopened about 325 files. And the imap_open() calls started succeeding as they should.</p>
<p>One last thought before I hop off my soapbox: when you find an answer to a problem, and that answer was hard to find or was not well documented, do your part to remedy that for the next guy or girl to hit that problem, and post your solution somewhere that Google will find it. It makes the internet a better place for all of us, and makes us all more productive. Who knows, maybe down the road you&#8217;ll run into the same problem again yourself, and not remember how to solve it until you find your own post from years before, and it will be your own time you&#8217;ll save. I fully recognize that a lot of what I accomplish each day is based on work done by others that I have found and emulated, as they say, standing on the shoulders of giants. Each contribution to the body of human knowledge lets us reach that much higher, so when you can, add your bit and as we all do that, it adds up.</p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2010/well-known-problems-with-undocumented-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why is coding so personal?</title>
		<link>http://dojo.codegreene.com/2010/why-is-coding-so-personal/</link>
		<comments>http://dojo.codegreene.com/2010/why-is-coding-so-personal/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:26:57 +0000</pubDate>
		<dc:creator>Benjam</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[coding style]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=448</guid>
		<description><![CDATA[
I&#8217;ve been noticing that often times, when getting or giving feedback on code, or browsing my favorite programming forum, or just reading posts about programming, that people often get very emotional about their code.  I was wondering why this is, and because I am not a psychologist, I&#8217;ll just give you my thoughts.
Coding to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-477" title="Why is coding so personal?" src="http://dojo.codegreene.com/wp-content/uploads/2010/02/personal1.jpg" alt="Why is coding so personal?" width="520" height="150" /><br />
I&#8217;ve been noticing that often times, when getting or giving feedback on code, or browsing my favorite programming forum, or just reading posts about programming, that people often get very emotional about their code.  I was wondering why this is, and because I am not a psychologist, I&#8217;ll just give you my thoughts.</p>
<p>Coding to me is like creating art, and there&#8217;s a great quote that backs me up on this:</p>
<blockquote><p>Programming is an art form that fights back. —Unknown</p></blockquote>
<p>Because code is like art, I get very attached to my code, as well as my style of coding.  My code is like my baby, my something from nothing that wouldn&#8217;t be there if it weren&#8217;t for me. It&#8217;s just a bunch of characters on the screen that, from somewhere in the blue smoke, creates a function, or a game, or a website.  I have received criticism on my code (as everyone has), as well as given criticism on other&#8217;s code (as everyone has), and those times when I&#8217;ve received criticism on my code, depending on how it was delivered, or what was said, it was almost like a personal attack on me.  And I&#8217;ve noticed a few other coders react the same way to criticisms on their code.  It&#8217;s like the person who called your code ugly or inelegant was saying that your child was ugly (and those of you who have kids know&#8230; that&#8217;s a huge no-no, punishable by any means available).</p>
<p>It may be because I think that my coding style is the best, it&#8217;s what I&#8217;m used to, and it&#8217;s the format I use because it&#8217;s the easiest for me to get at the information I need as fast as possible.  I know this because I&#8217;ve tried other styles (sometimes flipping back and forth in the same day), and looking at someone else&#8217;s code that uses a different style from me, is often times hard to peruse easily.  It&#8217;s what I like, and sometimes I have to hold myself back from reformatting code I come across into my own style.</p>
<p>So maybe we should stop thinking of code and coding styles as being &#8220;right&#8221; or &#8220;wrong&#8221;, and think of them more like the tool that they are, a means to an end.  And the way you react to someone else&#8217;s means should be a little more like a suggestion for a different method of painting.  Not a matter of fact, but just another tool for the tool box.</p>
<p>To continue the art analogy, it&#8217;s like everybody is given all the art supplies in the world, and told to make/paint/draw/create a box.  Everyone will come up with a different way of doing it, some will be huge and bright red; others will be small and drawn in pencil; others still might be made of clay or brick.  No matter what, it&#8217;s the way you chose to do it, and it&#8217;s no better or worse than the person&#8217;s next to you.  You might think so because yours was faster, fancier, more elegant, or more &#8220;boxy&#8221;; but they might think the opposite.  In the end, you still have a box, and so do they.</p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2010/why-is-coding-so-personal/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>What&#8217;s the best coding font?</title>
		<link>http://dojo.codegreene.com/2009/whats-the-best-coding-font/</link>
		<comments>http://dojo.codegreene.com/2009/whats-the-best-coding-font/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 17:44:44 +0000</pubDate>
		<dc:creator>Master Sensei</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://dojo.codegreene.com/?p=163</guid>
		<description><![CDATA[When I first started dabbling with HTML, it was from within the Notepad program on Windows 98. The font used was the one and only fixedsys, which happens to be the oldest font on Windows, dating all the way back to version 1.0.

Digital typography has come a long way in the last decade, and a [...]]]></description>
			<content:encoded><![CDATA[<p>When I first started dabbling with HTML, it was from within the Notepad program on Windows 98. The font used was the one and only <a title="Download it free" href="http://fixedsys.moviecorner.de/?p=download&amp;l=1" target="_blank">fixedsys</a>, which happens to be the oldest font on Windows, dating all the way back to version 1.0.</p>
<p><img class="size-full wp-image-164 alignnone" src="http://dojo.codegreene.com/wp-content/uploads/2009/02/fixedsys.gif" alt="fixedsys" width="480" height="230" /></p>
<p>Digital typography has come a long way in the last decade, and a wide array of monospaced beauties are now available for our coding pleasure. But what&#8217;s the <em>best</em> font choice when it comes to code? What about size? What about color? I think a lot of these decisions come down to personal preference, but one thing&#8217;s for sure, when you&#8217;re staring at a screen for hours on end, readability is paramount.</p>
<p><span id="more-163"></span></p>
<p>After a dark age of experimentation with WYSIWYG editors in the early 2000&#8217;s, I began to return to my coding roots. Sometime around 2003, I made the switch to Dreamweaver. Dreamweaver was the first editor I had used that took advantage of syntax coloring. The ability to recognize elements greatly increased scannability, and helped keep me in line while trying to write valid code.</p>
<div id="attachment_165" class="wp-caption alignnone" style="width: 502px"><img class="size-full wp-image-165" src="http://dojo.codegreene.com/wp-content/uploads/2009/02/dreamweaver.gif" alt="Some CSS syntax styling with Dreamweaver" width="492" height="178" /><p class="wp-caption-text">Some CSS syntax styling with Dreamweaver</p></div>
<p>At the time, I was using 9pt Monaco. The 9pt size was the default setting, and I must have just gotten used to it, because I left it like that for several years. That all changed when I noticed some of my coworkers beginning to use a program called <a title="Textmate" href="http://macromates.com/" target="_blank">TextMate</a>.</p>
<p>The theme that seduced me away from Dreamweaver was called Black Pearl. The light and mid-toned colors on the dark background had so much more contrast than the stark white I was used to. Colors aside, I noticed the font was much larger (12pt Monaco) and employed a beautifully rendered anti-alias.</p>
<p>I am now myself a proud owner of TextMate, and am loving the Blackboard theme. Tim and Luke both use the same theme, so this makes it easy to recognize syntax when we&#8217;re helping each other with code.</p>
<div id="attachment_166" class="wp-caption alignnone" style="width: 530px"><img class="size-full wp-image-166" src="http://dojo.codegreene.com/wp-content/uploads/2009/02/textmate.gif" alt="A slice of 12pt Monaco from TextMate's Blackboard theme" width="520" height="89" /><p class="wp-caption-text">A slice of 12pt Monaco from TextMate&#39;s Blackboard theme</p></div>
<p>But to each his own! I almost decided to use <a title="Coda" href="http://www.panic.com/coda" target="_blank">Coda</a> for the sheer sake of adding &#8216;Panic Sans&#8217; to my font library. Here are a few more runners up in my book:</p>
<ul>
<li>Andale Mono</li>
<li>Consolas</li>
<li>Bitstream Vera Sans Mono (Panic Sans&#8217; parent)</li>
<li>Lucida Console</li>
</ul>
<p>What&#8217;s <em>your</em> favorite coding font?</p>
]]></content:encoded>
			<wfw:commentRss>http://dojo.codegreene.com/2009/whats-the-best-coding-font/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
