<?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>Chris Jean&#039;s Blog &#187; programming</title>
	<atom:link href="http://chrisjean.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Mon, 30 Aug 2010 16:30:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>I Still Don&#8217;t Like Fancy Programming Editors</title>
		<link>http://chrisjean.com/2008/10/27/i-still-dont-like-fancy-programming-editors/</link>
		<comments>http://chrisjean.com/2008/10/27/i-still-dont-like-fancy-programming-editors/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 22:49:10 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Random Ramblings]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=417</guid>
		<description><![CDATA[For about eight years now, I&#8217;ve been hapily using Crimson Editor. At its simplest, Crimson Editor is nothing more than a fancy Notepad; however, it is so much more than that. While it doesn&#8217;t have all sorts of fancy tools that some editors have, it does support customizable syntax highlighting, customizable colors, line number, visible [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>For about eight years now, I&#8217;ve been hapily using <a href="http://crimsoneditor.com/" target="_blank">Crimson Editor</a>. At its simplest, Crimson Editor is nothing more than a fancy <a href="http://en.wikipedia.org/wiki/Notepad" target="_blank">Notepad</a>; however, it is so much more than that. While it doesn&#8217;t have all sorts of fancy tools that some editors have, it does support customizable syntax highlighting, customizable colors, line number, visible whitespace characters, basic smart indenting, a file/directory navigation pane, project support, and a MDI interface. Those features aren&#8217;t really the reason why I use it as almost all programming editors support such features. I use it because it gives me tools that help me program without doing things that hinder my productivity.</p>

<p>Two relatively-small features that most people would miss but make working with Crimson Editor a pleasure are as follows:</p>
<ul>
<li><strong>Built-in macro ability with quick access keys</strong> &#8211; I have a number of pre-defined macros that do all sorts of tasks that I find take too much time without. For example, I have macros that duplicate the line that I&#8217;m currenlty on, replace all the white-space characters at the front of the line with a single tab (this makes reformatting files with spaces for tabs much quicker), comment out or remove he comment from the current line, and so on.The addition of a quick-record button makes doing a number of repeat tasks extremely easy. I once had to remove every third line from a document that was 500 lines long. It would take too long to do it line-by-line and wasn&#8217;t worth the time required to crank out a script to do it for me. Using the quick macro ability, I created a macro and had all those lines removed in less than a minute.</li>
<li><strong>Regular expressions in search and replace</strong> &#8211; A number of programming tools are starting to add support for this, but Crimson Editor was one of the first ones that I encountered with this ability. Even many of the newer editors that I have tried fail at reproducing the ease that Crimson Editor has when it comes to this extremely helpful ability. You can even perform the replace command on all the currently open files at the same time.</li>
<li><strong>Remembers what I was doing last time I had the editor open</strong> &#8211; This is a slick feature that some of the newer editors are starting to pick up on. When I&#8217;m done for the day, I close everything out. When I come in the next day and open up Crimson Editor, it opens up all the files that I had open last time. Heck, it even puts the cursor where it was in all the files that I had opened previously.</li>
</ul>
<p>I think that editors these days try too hard. Rather than providing extremely robust syntax highlighting and a slick/customizable editor, they build in all these tools that are supposed to make my life easier. Unfortunately, most of these tools are touted as the &#8220;features&#8221; of the editor and cannot be disabled. Even more upsetting is that many of these tools actually decrease my productivity.</p>
<p>There are a number of trends in the current generation of editors that are coming these days that I really don&#8217;t like. Once again, it&#8217;s not that I think everything should be changed to accommodate me, I just think that the developers of these editors need to understand that not everyone wants feature X thus features that affect how editing works should be have the option of being disabled/enabled. I&#8217;ll pick on <a href="http://www.e-texteditor.com/" target="_blank">E-Text Editor</a> as it is so close to being great, but it has some of these failings as listed below:</p>
<ul>
<li><strong>Constantly adding characters that I didn&#8217;t type</strong> &#8211; This is a major point of frustration for me. So many of the modern editors that I have tried out want to &#8220;help&#8221; me write my programs. In their attempt to do so, they make mistakes and introduce syntax errors into my code. Those mistakes go by unnoticed by me as I can type out most of my code without looking and often am not looking since I&#8217;m looking at a terminal window, database output, or other information source while programming.For those who don&#8217;t know what I&#8217;m talking about, take <a href="http://www.e-texteditor.com/" target="_blank">E-Text Editor</a> as a good example of this behavior. Whenever I create an open parenthesis, it automatically creates a closed parenthesis. This seems like a nice way to prevent from forgetting a close parenthesis, but what if you are putting together something that requires an open parenthesis but not a close (such as regular expressions or adding new conditional checks inside an existing conditional)? Suddenly you have new characters that you may forget were created peppered around in your code that will create syntax errors. Frankly, I produce fewer syntax errors because of forgetting to close a paren than I did because of unnecessary close parens added by my editor while using E.</li>
<li><strong>Smart tabs that get too smart for their own good</strong> &#8211; I enjoy smart tabs. I like automatically having my next line indented after adding an open curly brace. I don&#8217;t like it when my editor continuously tries to force what it believes to be proper tabbing after I finish typing out a line. If I want to break out of the standard tab flow for whatever reason, that is my business. E-Text Editor, like so many modern text editors, refuses to allow me to do this. I say refuse, but it&#8217;s not always a 100% thing, which drives me nuts more than anything. Every so often, if I start a new line outside the common tab flow in E-Text Editor, when I hit enter, the previous line gets auto-tabbed and my new line is tabbed to match. No! I do not want that line there. If I go back and correct the auto-correction, as soon as I arrow out of the line, E moves it right back to where it was before. If I explicitly go outside of the &#8220;smart&#8221; tabbing, my editor should no longer try to force its rules on me.</li>
<li><strong>Ability to remember some things but not others</strong> &#8211; As mentioned before, I love how Crimson Editor remembers to open up all the files as I had them last time it was run. E-Text Editor, as well as many other newer editors, also have this feature. However, I feel that they aren&#8217;t doing enough. E-Text Editor implements code-folding, which is a very nice tool BTW. However, if you have lots of files open with many areas of code folded and you close the editor, when E reopens, all the files won&#8217;t be as you had left them; rather, they all open up but all the code folding is now gone. Not restoring the code folding state seems to be a major oversight to me as I want to come back to not just the same files I had yesterday but to the exact same state that my editor was in when I closed it. I really don&#8217;t want to spend the first part of my day refolding all my files so that I can get back to work.</li>
</ul>
<p>I suppose to some, these are not earth-shattering problems. I thought I could deal with them too and used E-Text Editor for the full 30 days of the trial. I fully expected to have my programming worldview changed and to fall in love with E. Instead, I was just as frustrated by the problems as I was on day one. I never got passed how I felt like some parts of E were just as annoying as <a href="http://en.wikipedia.org/wiki/Microsoft_Office_Word" target="_blank">Microsoft Word</a> when it autocorrects things. At least in Word, you could disable autocorrect. I wouldn&#8217;t be surprised if someone tells me to just turn off smart tabs in E. It&#8217;s not that I don&#8217;t like the smart tabs, it&#8217;s that I don&#8217;t like how E&#8217;s implementation of smart tabs doesn&#8217;t let me modify the text as I want it. I want it to auto-tab as I type but not enforce its will when I&#8217;m manually formating.</p>
<p>I suppose the crux of the problem I have with E, and most other next-gen editors, is that the features that are supposed to make me feel powerful and productive all too often times make me feel controlled and frustrated. Who knows&#8230; E is still new. I very well may be a convert if it becomes a bit more flexable.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2008/10/27/i-still-dont-like-fancy-programming-editors/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Empty uploaded files with Perl</title>
		<link>http://chrisjean.com/2008/07/30/empty-uploaded-files-with-perl/</link>
		<comments>http://chrisjean.com/2008/07/30/empty-uploaded-files-with-perl/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 16:28:46 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[empty upload]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=223</guid>
		<description><![CDATA[I work for a company that has a proprietary CMS software package written in Perl. We have a number of servers that run this code, and everything has been fine for a number of years and many different versions and customizations.  A few months back, something changed. One of our servers started producing completely empty [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I work for a company that has a proprietary CMS software package written in Perl. We have a number of servers that run this code, and everything has been fine for a number of years and many different versions and customizations.  A few months back, something changed. One of our servers started producing completely empty files for all uploads. This affected all of our code, all of our versions, and every site.</p>
<p>After some time debugging and testing, I finally found the problem. Apparently some code was updated, either Perl itself or one of its packages, and that caused my CGI object to be recylced before the upload code ran. When the CGI object gets recylced, all the file handles are closed resulting in reading and saving an empty file.</p>
<p>The solution was deceptively simple. All I had to do was store the CGI object in a persistent variable that has scope throughout the end of the program execution.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2008/07/30/empty-uploaded-files-with-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Important changes in WordPress 2.6</title>
		<link>http://chrisjean.com/2008/07/03/important-changes-in-wordpress-26/</link>
		<comments>http://chrisjean.com/2008/07/03/important-changes-in-wordpress-26/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 15:31:16 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=134</guid>
		<description><![CDATA[WordPress 2.6 allows for moving the wp-content folder and the wp-config.php file. Some code guidelines have been published to help developers standardize their plugins with the new changes. The following code will allow code to work with current versions and the upcoming 2.6. wp-content // Pre-2.6 compatibility if &#40; !defined&#40;&#8216;WP_CONTENT_URL&#8217;&#41; &#41;     define&#40; &#8216;WP_CONTENT_URL&#8217;, get_option&#40;&#8216;siteurl&#8217;&#41; [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>WordPress 2.6 allows for moving the wp-content folder and the wp-config.php file. Some <a href="http://planetozh.com/blog/2008/07/what-plugin-coders-must-know-about-wordpress-26/" target="_blank">code guidelines have been published</a> to help developers standardize their plugins with the new changes. The following code will allow code to work with current versions and the upcoming 2.6.</p>

<h3>wp-content</h3>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="co1">// Pre-2.6 compatibility</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span> !<a href="http://www.php.net/defined"><span class="kw3">defined</span></a><span class="br0">&#40;</span><span class="st0">&#8216;WP_CONTENT_URL&#8217;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">    <a href="http://www.php.net/define"><span class="kw3">define</span></a><span class="br0">&#40;</span> <span class="st0">&#8216;WP_CONTENT_URL&#8217;</span>, get_option<span class="br0">&#40;</span><span class="st0">&#8216;siteurl&#8217;</span><span class="br0">&#41;</span> . <span class="st0">&#8216;/wp-content&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span> !<a href="http://www.php.net/defined"><span class="kw3">defined</span></a><span class="br0">&#40;</span><span class="st0">&#8216;WP_CONTENT_DIR&#8217;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2">    <a href="http://www.php.net/define"><span class="kw3">define</span></a><span class="br0">&#40;</span> <span class="st0">&#8216;WP_CONTENT_DIR&#8217;</span>, ABSPATH . <span class="st0">&#8216;wp-content&#8217;</span> <span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// Guess the location</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$plugin_path</span> = WP_CONTENT_DIR.<span class="st0">&#8216;/plugins/&#8217;</span>. plugin_basename<span class="br0">&#40;</span><a href="http://www.php.net/dirname"><span class="kw3">dirname</span></a><span class="br0">&#40;</span><span class="kw2">__FILE__</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re0">$plugin_url</span> = WP_CONTENT_URL.<span class="st0">&#8216;/plugins/&#8217;</span>. plugin_basename<span class="br0">&#40;</span><a href="http://www.php.net/dirname"><span class="kw3">dirname</span></a><span class="br0">&#40;</span><span class="kw2">__FILE__</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<h3>wp-config.php</h3>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="re0">$root</span> = <a href="http://www.php.net/dirname"><span class="kw3">dirname</span></a><span class="br0">&#40;</span><a href="http://www.php.net/dirname"><span class="kw3">dirname</span></a><span class="br0">&#40;</span><a href="http://www.php.net/dirname"><span class="kw3">dirname</span></a><span class="br0">&#40;</span><a href="http://www.php.net/dirname"><span class="kw3">dirname</span></a><span class="br0">&#40;</span><span class="kw2">__FILE__</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/file_exists"><span class="kw3">file_exists</span></a><span class="br0">&#40;</span><span class="re0">$root</span>.<span class="st0">&#8216;/wp-load.php&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// WP 2.6</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span><span class="br0">&#40;</span><span class="re0">$root</span>.<span class="st0">&#8216;/wp-load.php&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Before 2.6</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span><span class="br0">&#40;</span><span class="re0">$root</span>.<span class="st0">&#8216;/wp-config.php&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2008/07/03/important-changes-in-wordpress-26/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing WP Easy Uploader</title>
		<link>http://chrisjean.com/2008/06/28/introducing-wp-easy-uploader/</link>
		<comments>http://chrisjean.com/2008/06/28/introducing-wp-easy-uploader/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 05:08:44 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.realthemes.com/?p=59</guid>
		<description><![CDATA[This time I have a plugin for the masses. WP Easy Uploader will make any WordPress user&#8217;s life easier. No longer will you have to rely on FTP to upload new plugins, themes, or random files. Now you can take care of those tasks quickly and easily from the admin screen of WordPress. For full [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>This time I have a plugin for the masses. WP Easy Uploader will make any WordPress user&#8217;s life easier. No longer will you have to rely on FTP to upload new plugins, themes, or random files. Now you can take care of those tasks quickly and easily from the admin screen of WordPress.</p>
<p>For full details, check out <a href="http://chrisjean.com/wp-easy-uploader/" target="_self">WP Easy Uploader&#8217;s release page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2008/06/28/introducing-wp-easy-uploader/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Introducing WP Developer Assistant</title>
		<link>http://chrisjean.com/2008/06/27/introducing-wp-developer-assistant/</link>
		<comments>http://chrisjean.com/2008/06/27/introducing-wp-developer-assistant/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 05:07:25 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.realthemes.com/?p=55</guid>
		<description><![CDATA[Time to release another public plugin into the wild. This plugin is a bit different in that it has nothing to do with how your site looks or operates. As a matter of fact, no one will even know that you have it, but you can rest well knowing that it is just a click [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Time to release another public plugin into the wild. This plugin is a bit different in that it has nothing to do with how your site looks or operates. As a matter of fact, no one will even know that you have it, but you can rest well knowing that it is just a click away in the admin menu. For you see, <a href="http://chrisjean.com/wp-developer-assistant/" target="_self">WP Developer Assistant</a> is a plugin for developers.</p>
<p>Now some of you may wonder what a developer needs a plugin for. Well, there are lots of reasons. The main one being that it would be a lot nicer if WordPress had a few extra tools that would make a developer&#8217;s life a lot easier. For example, being able to run any needed query from inside WordPress, being able to show PHP errors without turning them on for everyone, or uploading files and extracting archives anywhere in the site would be great tools to have, but WordPress doesn&#8217;t have anything like that&#8230; Until now!</p>
<p>If you are a WordPress developer, you need this plugin. You can find the full details on the <a href="http://chrisjean.com/wp-developer-assistant/" target="_self">WP Developer Assistant page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2008/06/27/introducing-wp-developer-assistant/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
