<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>For the Developer</title>
	
	<link>http://forthedeveloper.com</link>
	<description>By Developers, For Developers</description>
	<lastBuildDate>Tue, 14 Feb 2012 21:32:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ForTheDeveloper" /><feedburner:info uri="forthedeveloper" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Using $.Deferred to Group AJAX Requests</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/mxGGhsxmZVQ/</link>
		<comments>http://forthedeveloper.com/2012/using-deferred-to-group-ajax-requests/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 21:32:20 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Deferred]]></category>
		<category><![CDATA[Duplicate]]></category>
		<category><![CDATA[Group]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=334</guid>
		<description><![CDATA[I am working on a project that contains a lot of charts. Since the data driving the charts could take some time to load I am making each chart load asynchronously using jQuery&#8217;s ajax functions. This has worked great, but I noticed that some of the charts are using the same dataset, just charted differently&#8230;]]></description>
			<content:encoded><![CDATA[<p>I am working on a project that contains a lot of charts. Since the data driving the charts could take some time to load I am making each chart load asynchronously using jQuery&#8217;s ajax functions.</p>
<p>This has worked great, but I noticed that some of the charts are using the same dataset, just charted differently causing the same data to be requested multiple times from the server. One way to handle the duplicate requests is to use the <a href="http://api.jquery.com/category/deferred-object/" title="jQuery Deferred Object" target="_blank"><code>jQuery.Deferred()</code></a> when making requests.</p>
<p><span id="more-334"></span></p>
<p>In order to group the requests together I needed a way to determine if I already have one just like the request going through. To make this simple I used a <a href="http://www.webtoolkit.info/javascript-md5.html" title="Javascript MD5" target="_blank">MD5 library</a> and <code>JSON.stringify()</code> to create a hash of the data that I am sending to the server.</p>
<p>If the hash is unique then I add a deferred object and make the ajax call. Otherwise, I bind to the previous deferred object and wait for the request to finish. Since we are using the <a href="http://api.jquery.com/category/deferred-object/" title="jQuery Deffered Object" target="_blank">jQuery Deferred object</a> the callback will still have the data even if there is a gap between the original ajax request.</p>
<p>Here is a simplified example:</p>
<p><script src="https://gist.github.com/1830528.js?file=jquery.groupedAjax.js"></script></p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/mxGGhsxmZVQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2012/using-deferred-to-group-ajax-requests/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2012/using-deferred-to-group-ajax-requests/</feedburner:origLink></item>
		<item>
		<title>How To Make A Snowball</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/EX1ocB0UeeE/</link>
		<comments>http://forthedeveloper.com/2011/how-to-make-a-snowball/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 20:13:22 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[browsers]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[personal finance]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=320</guid>
		<description><![CDATA[Earlier I talked about why I created Yeti, the simple debt snowball calculator. Now I am going to talk about some of the technical decisions that went into the initial release. Ingredients To start off, here is my ingredient list for Yeti: HTML5. Sugary, semantic goodness. CSS3. Makes things snazzy. jQuery. Fast, easy, and cross-browser.&#8230;]]></description>
			<content:encoded><![CDATA[<div class="hang-2-column" style="width:170px;"><a href="http://ballofsnow.org" title="Yeti: Start a Snowball Fight!"><img src="http://forthedeveloper.com/wp-content/uploads/2011/12/Yeti.jpg" width="170" height="170" /></a></div>
<p>Earlier I talked about <a href="http://forthedeveloper.com/2011/yeti-hunting/" title="Yeti Hunting">why I created Yeti</a>, the simple debt snowball calculator. Now I am going to talk about some of the technical decisions that went into the initial release.</p>
<p><span id="more-320"></span></p>
<h2>Ingredients</h2>
<p>To start off, here is my ingredient list for <a href="http://ballofsnow.org" title="Yeti: Start A Snowball Fight!">Yeti</a>:</p>
<ul>
<li><strong><a href="http://www.html5rocks.com/en/" title="HTML5 Rocks!">HTML5.</a></strong> Sugary, semantic goodness.</li>
<li><strong><a href="http://www.css3.info/" title="CSS3">CSS3.</a></strong> Makes things snazzy.</li>
<li><strong><a href="http://jquery.com/" title="jQuery">jQuery.</a></strong> Fast, easy, and cross-browser. What else could you ask for?</li>
<li><strong><a href="http://www.google.com/webfonts" title="Google Web Fonts">Google Web Fonts.</a></strong> Life looks better with a good font.</li>
<li><strong><a href="http://lesscss.org/" title="LESS CSS">LESS CSS.</a></strong> Makes CSS dynamic.</li>
</ul>
<h2>Simplicity</h2>
<p>The main goal of <a href="http://ballofsnow.org" title="Yeti: Start A Snowball Fight!">Yeti</a> is to be simple.</p>
<p>I have removed anything that is not essential to snowballing. There are a lot of things that I &#8216;could&#8217; do that I won&#8217;t because they would cause undue complexity.</p>
<h2>Forgiving</h2>
<p>One philosophy of form design that I strongly agree with is to be <a href="http://miksovsky.blogs.com/flowstate/2010/09/form-validation-feedback-be-slow-to-complain-and-quick-to-forgive.html" title="Form validation feedback: Be slow to complain, and quick to forgive">slow to anger and quick to forgive</a>.</p>
<p>Even though there are many ways to have invalid input I try to only show error messages to the users when they have navigated away from an element so that they are not being bugged about something that they are in the middle of changing.</p>
<p>At the same time I tried to build in some unobtrusive functionality to make things a bit easier for data entry. Things such as automatically calculating the minimum payment for a loan and increasing the repayment amount when it is no longer enough to cover the minimum payments.</p>
<h2>Repeat customers</h2>
<p>The nature of <a href="http://ballofsnow.org" title="Yeti: Start A Snowball Fight!">Yeti</a> is to be useful over a long period of time. Since most people will have debt that takes many months, even years, to pay off it would be annoying to have to re-enter the debt information each time they want to perform a checkup on their progress.</p>
<p>To that end, there is an option to save the information for later use. Rather than have a server setup to store the data and having to worry about overhead and privacy of storing the debt information <a href="http://ballofsnow.org" title="Yeti: Start A Snowball Fight!">Yeti</a> is using <code>localStorage</code> to store the debt and payment information.</p>
<p>This makes the data specific to the browser, but it makes things a lot less complex and is completely optional for those who would like to use it.</p>
<h2>Almost too fast.</h2>
<p>One of the awesome things about doing all the calculations locally is that they are done really quickly. In early tests it was calculating an entire strategy in about 3ms.</p>
<p>Part of the original design was to have a button that could be used to calculate the snowballing after you make changes. Since the calculations were so fast I removed the button and just listened for the input to change. Every time the input changes the values are checked to make sure they meet some basic rules then the repayment schedule is calculated and the results are updated. Since any change to the data updated the calculations you could watch as you change numbers and see the graph and numbers change <strong>almost</strong> instantly.</p>
<p>While it was awesome to watch, many of the modern browsers have built in spinners for the HTML5 number inputs. This allows you to press the up/down arrows to change the value of the field. With the calculations happening on the value change, you could hold down the up arrow on the repayment amount and watch the chart morph as the debt was paid off faster. It was quite fun to watch!</p>
<p>The down side is that when multiple large loans were added the calculations couldn&#8217;t keep up with the constant stream of input changes so the browser would lag trying to catch up. This makes for a definite bad experience.</p>
<p>To prevent the browser from stalling a pause was put in place to only update the calculations when there has been no changes for 100ms. Now you can hold down the up/down arrows and the calculations will be only be updated when you take your finger off for more than 100ms and the browser stall goes away.</p>
<h2>Try it!</h2>
<p>So what are you waiting for? Go check it out: <a href="http://ballofsnow.org" title="Yeti: Start A Snowball Fight!">Yeti</a>.</p>
<p>Also checkout <a href="https://github.com/emberfeather/yeti/" title="Yeti on Github">Yeti on Github</a>!</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/EX1ocB0UeeE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2011/how-to-make-a-snowball/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2011/how-to-make-a-snowball/</feedburner:origLink></item>
		<item>
		<title>Yeti Hunting</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/LuRK5c0oSHw/</link>
		<comments>http://forthedeveloper.com/2011/yeti-hunting/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 06:22:23 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[personal finance]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[calculator]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[debt]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[loan]]></category>
		<category><![CDATA[mortgage]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[repayment]]></category>
		<category><![CDATA[snowball]]></category>
		<category><![CDATA[student loan]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=303</guid>
		<description><![CDATA[I just released a simple debt snowball calculator: Yeti. Since college I have had many conversations about the best way to pay off student loans, credit cards, and mortgages. If you only have a single debt, the answer is simple, spend more&#8211;pay it off sooner and save interest. The more debts that you have, the&#8230;]]></description>
			<content:encoded><![CDATA[<div class="hang-2-column" style="width:170px;"><a href="http://ballofsnow.org" title="Yeti: Start a Snowball Fight!"><img src="http://forthedeveloper.com/wp-content/uploads/2011/12/Yeti.jpg" width="170" height="170" /></a></div>
<p>I just released a simple debt snowball calculator: <a href="http://ballofsnow.org" title="Yeti: Start a Snowball Fight!">Yeti</a>.</p>
<p>Since college I have had many conversations about the best way to pay off student loans, credit cards, and mortgages.</p>
<p>If you only have a single debt, the answer is simple, spend more&#8211;pay it off sooner and save interest. The more debts that you have, the trickier it is.</p>
<p>A common approach is to use a <a href="http://mythsonmoney.com/2011/12/mythtip-building-a-debt-snowball/" title="Building a Debt Snowball">debt snowball</a> to gain momentum by focusing on single loans at a time and keeping the debt repayment amount constant after each is paid off. This creates a &#8220;snowball&#8221; effect where the money you were spending on a loan gets added to the next loan repayment and the &#8220;snowball&#8221; gets larger&#8211;debts get paid faster. Simple idea and a good way to pay off debts quickly. But did you know that the order that you pay off debts changes how much money you can save on interest?</p>
<p><span id="more-303"></span></p>
<p>This project is not the first time that I have attempted to make a debt snowball calculator. It is my third attempt.</p>
<p>For my first attempt, I tried to learn how to use Adobe AIR to make a desktop application that people could use to track their debt and keep updating. I had a lot of plans for it: multiple accounts, nice, pretty charts, fancy interface, cool background articles, etc. That app didn&#8217;t make it very far. I got the basics done enough that I could show an amortization and simple chart, but there were some technical obstacles that I did not have the time or energy to work out and the desire to finish it floundered.</p>
<p>A year or two later I was out of college and starting my first job as a graduated citizen&#8230; with graduated student loans. This spurred my second attempt at a debt snowball application. Similar to the first attempt, I had grand ideas and visions for features. This time I decided to use a server side application and just run it as a normal web application. Things started out pretty good, but there were some major downsides that turned me off to finishing it. It was slow, I did not have a place to host it, and no time to make it into my &#8216;dream&#8217; snowball application. So I used it to help get myself out of debt (going on 18 months without debt!) and that is as far as it went.</p>
<p>Since I have been debt free I have not really thought about the debt snowball idea for a while. It was a thing of my past, like a shed snake skin that I didn&#8217;t have a use for anymore. But I was talking with an old co-worker and friend about the idea of debt snowballing and it got my brain going again. Even though I do not need to use it on my own debt, I still talk to many friends and family about repaying their debt and I am excited when I get to help people save money, especially when it is something as simple as paying debt off in a different order.</p>
<p>Using this fresh batch of excitement I gave the snowball calculator another go. But this time I decided to approach it differently to avoid my earlier mishaps:</p>
<ol>
<li><strong>Simple.</strong> I wanted to shed a lot of the complex ideas that would make it a burden to develop and never get &#8216;done&#8217;.</li>
<li><strong>Fast.</strong> My first attempts were a lot slower than I wanted them to be, taken many seconds to process each change. I wanted this project to be fast!</li>
<li><strong>Scalable.</strong> If the service started getting heavy use I didn&#8217;t want to worry about the hosting strain from a successful project.</li>
<li><strong>Simple.</strong> Did I mention simple?</li>
</ol>
<p>With this in mind, I made a single page JavaScript debt snowball calculator. Since is a single page with no login, optional local storage, and a limited UI/feature set I could ignore a lot of the original complexities. With no dynamic server processing (everything is done with HTML5, JavaScript, and CSS in the browser) it would not have to wait for page submissions/ajax requests to show the calculations. And since I was able to use Github pages to host the site it was free, scalable, and quick loading.</p>
<p>With my third attempt, I hope to catch the great snow beast and make it easy to understand debt snowballing.</p>
<p>Its free, fast, and fun to experience. I hope you enjoy it as much as I enjoyed creating it!</p>
<p>So what are you waiting for? Go check it out: <a href="http://ballofsnow.org" title="Yeti: Start a Snowball Fight!">Yeti</a>.</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/LuRK5c0oSHw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2011/yeti-hunting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2011/yeti-hunting/</feedburner:origLink></item>
		<item>
		<title>Billings Pro Server 1.5 Port Forwarding</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/U6EgPGWvlqs/</link>
		<comments>http://forthedeveloper.com/2011/bps-1-5-port-forwarding/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 17:30:45 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[billings pro]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[marketcircle]]></category>
		<category><![CDATA[billings pro server]]></category>
		<category><![CDATA[invoice]]></category>
		<category><![CDATA[not reachable]]></category>
		<category><![CDATA[port forwarding]]></category>
		<category><![CDATA[timecard]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=297</guid>
		<description><![CDATA[I&#8217;ve been using Billings Pro (BP) since it first debuted. I love it. It is a very nice, simple way of tracking and invoicing clients with multiple people working on the projects. I&#8217;ve been running Billings Pro Server (BPS) and syncing up with a remote machines running BP. However, with the recent upgrade to 1.5&#8230;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Billings Pro (BP) since it first debuted. I love it. It is a very nice, simple way of tracking and invoicing clients with multiple people working on the projects. I&#8217;ve been running Billings Pro Server (BPS) and syncing up with a remote machines running BP. However, with the recent upgrade to 1.5 the syncing stopped working.</p>
<p><span id="more-297"></span></p>
<p>Testing directly through the modem the server was able to connect and was listed as reachable. But, going through the router it would be listed as not reachable. I double checked the ports, as indicated in the advanced network dialog (ports 7113, 7116, 7117, and 7118), were being forwarded in the router correctly.</p>
<p>After several emails with support there didn&#8217;t seem to be any resolution coming so I decided to dig a bit deeper and see what it was actually doing when it was successful.</p>
<p>Using tcpdump I noticed that there were some requests going through to some ports from the Switchboard server that were not one of the listed public IPs of the Advanced Network Dialog in the BPS. Specifically it was trying to talk to ports 60525, 60526, and 60527. I added those to my port forwarding on my router and all the Billings Pro Server is now listed as `reachable`.</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/U6EgPGWvlqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2011/bps-1-5-port-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2011/bps-1-5-port-forwarding/</feedburner:origLink></item>
		<item>
		<title>Combining the Cicada Principle with CSS3 Background Gradients</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/T6ygH4B4Sx4/</link>
		<comments>http://forthedeveloper.com/2011/cicada-principle-with-css3/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 22:00:33 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[cicada]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[linear gradient]]></category>
		<category><![CDATA[multiple background]]></category>
		<category><![CDATA[opacity]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=267</guid>
		<description><![CDATA[Lately I have been trying to use CSS as much as possible without having to make images, especially for backgrounds. A few months back I read about the cicada principle as it relates to design. It was a fascinating read, if you haven&#8217;t read it already, you should do yourself a favor and read it&#8230;]]></description>
			<content:encoded><![CDATA[<p>Lately I have been trying to use CSS as much as possible without having to make images, especially for backgrounds. A few months back I read about <a href="http://designfestival.com/the-cicada-principle-and-why-it-matters-to-web-designers/">the cicada principle</a> as it relates to design. It was a fascinating read, if you haven&#8217;t read it already, you should do yourself a favor and <a href="http://designfestival.com/the-cicada-principle-and-why-it-matters-to-web-designers/">read it now</a>. Also check out their <a href="http://designfestival.com/cicada/">cicada gallery</a> for interesting examples of the cicada principle in action.</p>
<p><span id="more-267"></span></p>
<p>In the example, the author uses png images and repeats them. I wanted to try and do something similar but done purely in CSS. I found some really good resources dealing with CSS 3 and backgrounds, specifically this one <a href="http://leaverou.me/2011/04/css3-patterns-gallery-and-a-new-pattern/">dealing with patterns</a> and a <a href="http://leaverou.me/css3patterns/">pattern gallery</a>.</p>
<p>These may not work depending upon how new your browser is. See the note about <a href="http://leaverou.me/css3patterns/#browser-support">browser compatibility on the pattern gallery</a>.</p>
<p>So naturally I wanted to combine them both into a pure CSS version of the Cicada pattern:</p>
<div class="hang-2-column" style="width: 620px; background-color: #efefef; background-size: 13px, 29px, 37px, 53px; background-image: -webkit-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -webkit-linear-gradient(0, rgba(201,184,88,.13) 50%, transparent 50%), -webkit-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%), -webkit-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%); background-image: -moz-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -moz-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%), -moz-linear-gradient(0, rgba(168,137,73,.17) 50%, transparent 50%), -moz-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%); background-image: -o-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), -o-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%), -o-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%), -o-linear-gradient(0, rgba(99,78,60,.19) 50%, transparent 50%); background-image: linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%), linear-gradient(0, rgba(201,184,88,.13) 50%, transparent 50%), linear-gradient(0, rgba(168,137,73,.17) 50%, transparent 50%), linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%); height: 15em; border: 1px solid;"><!-- --></div>
<p>And since it is is all generated with css there are no images and you could get fancier with the colors, gradients, and opacities if you want.</p>
<p>Here is an example of one that takes a single base color (#026873) and adds highlights to it:</p>
<div class="hang-2-column" style="width: 620px; background-color: #026873; background-size: 13px, 29px, 37px, 53px; background-image: -webkit-linear-gradient(0, rgba(255,255,255,.07) 50%, transparent 50%), -webkit-linear-gradient(0, rgba(255,255,255,.13) 50%, transparent 50%), -webkit-linear-gradient(0, transparent 50%, rgba(255,255,255,.17) 50%), -webkit-linear-gradient(0, transparent 50%, rgba(255,255,255,.19) 50%); background-image: -moz-linear-gradient(0, rgba(255,255,255,.07) 50%, transparent 50%), -moz-linear-gradient(0, rgba(255,255,255,.13) 50%, transparent 50%), -moz-linear-gradient(0, transparent 50%, rgba(255,255,255,.17) 50%), -moz-linear-gradient(0, transparent 50%, rgba(255,255,255,.19) 50%); background-image: -o-linear-gradient(0, rgba(255,255,255,.07) 50%, transparent 50%), -o-linear-gradient(0, rgba(255,255,255,.13) 50%, transparent 50%), -o-linear-gradient(0, transparent 50%, rgba(255,255,255,.17) 50%), -o-linear-gradient(0, transparent 50%, rgba(255,255,255,.19) 50%); background-image: linear-gradient(0, rgba(255,255,255,.07) 50%, transparent 50%), linear-gradient(0, rgba(255,255,255,.13) 50%, transparent 50%), linear-gradient(0, transparent 50%, rgba(255,255,255,.17) 50%), linear-gradient(0, transparent 50%, rgba(255,255,255,.19) 50%); height: 15em; border: 1px solid;"><!-- --></div>
<p>Here is the css:</p>
<p><script src="https://gist.github.com/1013197.js?file=cicada.css"></script></p>
<p>You can see the full examples in the <a href="https://gist.github.com/1013197">gist</a>.</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/T6ygH4B4Sx4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2011/cicada-principle-with-css3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2011/cicada-principle-with-css3/</feedburner:origLink></item>
		<item>
		<title>External Links in A New Window</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/eEUh4SCUGK0/</link>
		<comments>http://forthedeveloper.com/2011/external-links-in-a-new-window/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 16:55:59 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=257</guid>
		<description><![CDATA[One of my friends was talking about how they wanted links to open up in a new window so that people wouldn&#8217;t have to leave the website to see the pages. Not that uncommon of an idea, but the method that was being used for it was a bit overkill. This post mentions that you&#8230;]]></description>
			<content:encoded><![CDATA[<p>One of my friends was talking about how they <a href="http://nikkianddanny.blogspot.com/2011/02/how-to-make-each-link-open-in-new.html">wanted links to open up in a new window</a> so that people wouldn&#8217;t have to leave the website to see the pages. Not that uncommon of an idea, but the method that was being used for it was a bit overkill.</p>
<p><span id="more-257"></span></p>
<p><a href="http://leeloublogs.blogspot.com/2007/12/how-to-make-each-link-open-in-new.html">This post</a> mentions that you can use the <code>&lt;base target='_blank'/&gt;</code> to make all links open in a new window. The big with that is that <strong>ALL</strong> of your links now open in a new window, not only the links that are external links. Makes for a lot of windows/tabs if you are browsing the site a bit.</p>
<p>I was thinking that it would be better if you could inspect each of the links and determine if they should be opened in a new window or not. But I also wanted to support multiple types of links, such as <code>./</code>, <code>/</code>, <code>//</code>, <code>http://</code>, <code>https://</code>, etc.</p>
<p>So I did a little morning exercise and <a href="https://gist.github.com/812525">this is what I came up with</a>:</p>
<p><script src="https://gist.github.com/812525.js"></script></p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/eEUh4SCUGK0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2011/external-links-in-a-new-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2011/external-links-in-a-new-window/</feedburner:origLink></item>
		<item>
		<title>jQuery Sortables with Ctrl + Drop Copying</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/sHbzcOtu0qo/</link>
		<comments>http://forthedeveloper.com/2011/jquery-sortables-with-ctrl-drop-copying/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 21:08:38 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[sortable]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=230</guid>
		<description><![CDATA[Currently I am working on a project that has a few jQuery sortable lists on the page. One of the new features that I wanted to implement was the ability to copy elements from one sortable to another. I couldn&#8217;t see any option for this in the standard sortable so I decided to see how&#8230;]]></description>
			<content:encoded><![CDATA[<p>Currently I am working on a project that has a few jQuery sortable lists on the page. One of the new features that I wanted to implement was the ability to copy elements from one sortable to another. I couldn&#8217;t see any option for this in the standard sortable so I decided to see how hard it would be to add.</p>
<p><a href="/gists/765117/sortableCopy.html" target="_blank">Example of sortable element copying between connected sortables.</a></p>
<p><span id="more-230"></span></p>
<p>The example that got me started was from a question by <a href="http://www.google.com/profiles/boughtonp">Peter Boughton</a> <a href="http://stackoverflow.com/questions/1775790/jquery-ui-sortable-draggable-with-palette-copy-remove-instead-of-moving">on stackflow</a>. In his question/example, Peter was trying to control what happened with a sortable based upon where it was being dragged to/from. My use case was slightly different but the example brought the <code>receive</code> event to my attention.</p>
<p>Using the receive event for the sortable I was able to check to see if the <code>ctrl</code>key was pressed and use that to trigger the copy functionality. If the <code>ctrl</code> key is pressed I can trigger the cloning, if it is not pressed I just leave it alone and let it act as normal.</p>
<p>The hard part was to determine just where to place the cloned item. I wanted the original sortable to keep the same ordering and the item to still be placed where it was dropped in the new sortable. The receive event itself does not stop the element from being placed into the new sortable, hence the clone would need to be placed back into the original sortable in the previous index slot.</p>
<p>To accomplish the correct ordering I use the <code>updateAreas()</code> to update the index of the sortable items before anything happens and after every update is complete. This gives me the previous index for clone positioning since it happens before the update triggers.</p>
<p>Here is the source behind it all:</p>
<p><script src="https://gist.github.com/765117.js"></script></p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/sHbzcOtu0qo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2011/jquery-sortables-with-ctrl-drop-copying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2011/jquery-sortables-with-ctrl-drop-copying/</feedburner:origLink></item>
		<item>
		<title>GIT SSH keys with Hudson on Ubuntu’s Tomcat</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/nWvssH-5_6c/</link>
		<comments>http://forthedeveloper.com/2010/git-ssh-keys-with-hudson-on-ubuntu%e2%80%99s-tomcat/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 23:54:14 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[tomcat6]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=220</guid>
		<description><![CDATA[I&#8217;ve recently covered how to configure git with Hudson on Ubuntu&#8217;s Tomcat and it has worked quite well. After taking the plunge and subscribing to have private repositories on github I ran into an issue of not being able to clone the private repository since it was&#8230; well, private. Here is the message I was&#8230;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently covered how to <a href="/2010/git-config-with-hudson-on-ubuntus-tomcat/">configure git with Hudson on Ubuntu&#8217;s Tomcat</a> and it has worked quite well. After taking the plunge and subscribing to have private repositories on <a href="http://github.com">github</a> I ran into an issue of not being able to clone the private repository since it was&#8230; well, private.</p>
<p><span id="more-220"></span></p>
<p>Here is the message I was seeing:</p>
<blockquote><p><code>ERROR: Error cloning remote repo 'origin' : Could not clone https://username@github.com/username/repository.git<br />
ERROR: Cause: Error performing git clone -o origin https://username@github.com/username/repository.git /srv/hudson/jobs/repository/workspace<br />
Trying next repository<br />
ERROR: Could not clone from a repository<br />
FATAL: Could not clone<br />
hudson.plugins.git.GitException: Could not clone<br />
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:587)<br />
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:535)<br />
	at hudson.FilePath.act(FilePath.java:753)<br />
	at hudson.FilePath.act(FilePath.java:735)<br />
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:535)<br />
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1038)<br />
	at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)<br />
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)<br />
	at hudson.model.Run.run(Run.java:1257)<br />
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)<br />
	at hudson.model.ResourceController.execute(ResourceController.java:88)<br />
	at hudson.model.Executor.run(Executor.java:129)</code></p></blockquote>
<p><!-- more --></p>
<p>To solve the problem we need to create an ssh key for the tomcat user so that it can access the repository.</p>
<blockquote><p><code>cd /usr/share/tomcat6<br />
sudo mkdir .ssh<br />
cd .ssh/<br />
sudo touch known_hosts<br />
sudo ssh-keygen -t rsa -C "tomcat@forthedeveloper.com"</code></p></blockquote>
<p>When creating the key pair save the key to <code>/usr/share/tomcat6/.ssh/id_rsa</code>.</p>
<p>I don&#8217;t know how to tell tomcat the passphrase for a ssh key, so I just left the passphrase blank.</p>
<p>Once the key has been created we need to add the github site to the known_hosts file. If you have already setup your normal account for working with github and have xclip installed you can run the following to copy the github ssh host information:</p>
<blockquote><p><code>ssh-keygen -F github.com | xclip -sel clip</code></p></blockquote>
<p>Edit the <code>/usr/share/tomcat6/.ssh/known_hosts</code> file and paste in the copied host information.</p>
<p>To finish things up:</p>
<blockquote><p><code>sudo chown -R tomcat6:tomcat6 /usr/share/tomcat6/.ssh/<br />
sudo /etc/init.d/tomcat6 restart</code></p></blockquote>
<p>You can copy the new ssh key for tomcat to your clipboard if you have xclip installed with:</p>
<blockquote><p><code>cat /usr/share/tomcat6/.ssh/id_rsa.pub | xclip -sel clip</code></p></blockquote>
<p>If you are only using hudson for one repository you can just add the public key to the one repository in the repository admin (ex: https://github.com/username/repository/edit) under the &#8216;Deploy Keys&#8217; area. Otherwise you can <a href="https://github.com/account">add it to your account&#8217;s &#8216;SSH Public Keys&#8217;</a> to allow the tomcat server access to all of your repositories.</p>
<p>Now when you run hudson against your private github repository it should have the proper access.</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/nWvssH-5_6c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2010/git-ssh-keys-with-hudson-on-ubuntu%e2%80%99s-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2010/git-ssh-keys-with-hudson-on-ubuntu%e2%80%99s-tomcat/</feedburner:origLink></item>
		<item>
		<title>GIT Configuration with Hudson on Ubuntu’s Tomcat</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/QhLsV4KFlt4/</link>
		<comments>http://forthedeveloper.com/2010/git-config-with-hudson-on-ubuntus-tomcat/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 04:21:22 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[ci]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=198</guid>
		<description><![CDATA[During my recent migration from using SVN to using GIT for my open source projects I was reconfiguring my Hudson CI server and started seeing this message: Caused by: hudson.plugins.git.GitException: Command returned status code 128: *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" I&#8230;]]></description>
			<content:encoded><![CDATA[<p>During my recent migration from using SVN to using GIT for my open source projects I was reconfiguring my Hudson CI server and started seeing this message:</p>
<blockquote><p><code><br />
Caused by: hudson.plugins.git.GitException: Command returned status code 128:<br />
*** Please tell me who you are.</p>
<p>Run</p>
<p>  git config --global user.email "you@example.com"<br />
  git config --global user.name "Your Name"<br />
</code></p></blockquote>
<p><span id="more-198"></span></p>
<p>I was a little confused to see this message since I had already configured git to have my user name and email. Then I remembered that hudson is running on tomcat which is running with the tomcat6 user. I needed to configure the tomcat6 user to have the git configuration necessary to tag on the git repositories.</p>
<p><strong>[UPDATE: 24 Jun 2010]</strong></p>
<p>I was working on repeating this process on Ubuntu 10.04 and was getting permission errors running the command to set the git config for the tomcat6 user. Here is an updated method:</p>
<p>First we need to create a <code>.gitconfig</code> file for the tomcat6 user:</p>
<blockquote><p><code><br />
sudo touch /usr/share/tomcat6/.gitconfig<br />
sudo chown tomcat6:tomcat6 /usr/share/tomcat6/.gitconfig<br />
sudo nano /usr/share/tomcat6/.gitconfig<br />
</code></p></blockquote>
<p>Place the following in the <code>.gitconfig</code> file:</p>
<blockquote><p><code><br />
[user]<br />
	name = Hudson<br />
	email = hudson@myDomain.com<br />
</code></p></blockquote>
<p>Once the file is saved&#8211;you may need to restart Tomcat&#8211;it should pick up your git configuration.</p>
<p><strong>[/UPDATE]</strong></p>
<p><strong>[ORIGINAL: see updated instructions above]</strong></p>
<p>Setup the git configuration for the tomcat6 user by doing the following:</p>
<blockquote><p><code><br />
sudo -s -H -u tomcat6<br />
git config --global user.name "Hudson"<br />
git config --global user.email "hudson@mydomain.com"<br />
exit<br />
</code></p></blockquote>
<p><em>As a note</em>, if you are using hudson to commit and push to another repository these configuration settings will be used for all commits done by Hudson.</p>
<p>The next step is to let hudson know where the <code>HOME</code> is for the tomcat6 user. On the <code><a href="http://localhost:8080/hudson/configure">hudson/configure</a></code> page there is a checkbox for defining <code>environment variables</code>. Once it is checked you will be able to put in a key-value pair. Add the following pair and save your configuration:</p>
<blockquote><p><code><br />
name: HOME<br />
value: /usr/share/tomcat6/<br />
</code></p></blockquote>
<p>The next time a hudson project is built you should see the following line close to the top of the console output:</p>
<blockquote><p><code>Env: HOME=/usr/share/tomcat6/</code></p></blockquote>
<p><strong>[/ORIGINAL]</strong></p>
<p>The git plugin should now be able to successfully tag the repository and continue with the build.</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/QhLsV4KFlt4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2010/git-config-with-hudson-on-ubuntus-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2010/git-config-with-hudson-on-ubuntus-tomcat/</feedburner:origLink></item>
		<item>
		<title>Google AJAX Library CDN Versioning</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/8h-fVY39FxM/</link>
		<comments>http://forthedeveloper.com/2010/google-ajax-library-cdn-versioning/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 01:34:51 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[Ext Core]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[MooTools Dojo]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[script_aculo_us]]></category>
		<category><![CDATA[SWFObject]]></category>
		<category><![CDATA[Yahoo! UI]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=168</guid>
		<description><![CDATA[It&#8217;s amazing what you find when you read the documentation. Since I always forget the address for Google&#8217;s CDN hosting of jQuery I have to search for it each time. This time when I found the address I was looking around a bit and found out this interesting tidbit that I didn&#8217;t know before about&#8230;]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s amazing what you find when you read the documentation. Since I always forget the address for Google&#8217;s CDN hosting of jQuery I have to search for it each time. This time when I found the address I was looking around a bit and found out this interesting tidbit that I didn&#8217;t know before about Google&#8217;s CDN for their AJAX libraries.</p>
<blockquote><p>Specifying a version of &#8220;1.8.2&#8243; will select the obvious version. This is because a fully specified version was used. Specifying a version of &#8220;1.8&#8243; would select version 1.8.4 since this is the highest versioned release in the 1.8 branch. For much the same reason, a request for &#8220;1&#8243; will end up loading version 1.9.1.</p>
<p><cite><a href="http://code.google.com/apis/ajaxlibs/documentation/" title="Google AJAX Libraries API Developer's Guide">Google AJAX Libraries API Developer&#8217;s Guide</a></cite>
</p></blockquote>
<p><span id="more-168"></span></p>
<p>For example, if I were linking to jQuery I would normally have used the following and updated semi-regularly:</p>
<blockquote><p><code>http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js</code></p></blockquote>
<p>But if I just want the latest for the &#8220;1.3&#8243; version I could reference:</p>
<blockquote><p><code>http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js</code></p></blockquote>
<p>Or if I was feeling really risky and trust jQuery not to break between versions:</p>
<blockquote><p><code>http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js</code></p></blockquote>
<p>Hope its as useful to others as I found it!</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/8h-fVY39FxM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2010/google-ajax-library-cdn-versioning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2010/google-ajax-library-cdn-versioning/</feedburner:origLink></item>
		<item>
		<title>Railo Express with Multiple Local Hosts</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/0vySfxlbRo4/</link>
		<comments>http://forthedeveloper.com/2009/railo-express-multiple-local-hosts/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 05:47:46 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[railo]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[cfml]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[linux windows]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=154</guid>
		<description><![CDATA[This is how you can configure Railo Express to use Jetty virtual hosts and local host file entries to point to a single Railo Express installation. This was extremely useful while developing applications that power multiple domains. For this example, we are going to add a virtual host for the snow.ftd host. Jetty Setup Jetty&#8230;]]></description>
			<content:encoded><![CDATA[<p>This is how you can configure <a href="http://www.getrailo.org/index.cfm/download/">Railo Express</a> to use Jetty virtual hosts and local host file entries to point to a single Railo Express installation. This was extremely useful while developing applications that power multiple domains.</p>
<p><span id="more-154"></span></p>
<p>For this example, we are going to add a virtual host for the <code>snow.ftd</code> host.</p>
<h3>Jetty Setup</h3>
<p><a href="http://www.mortbay.org/jetty/">Jetty</a> makes it really easy to <a href="http://docs.codehaus.org/display/JETTY/Virtual+hosts">configure virtual hosts</a> for a context.</p>
<p>The configuration file in Railo Express at <code><em>{railo-express-directory}</em>/contexts/railo.xml</code> already has the configuration setup to start us off:</p>
<p><code>
<pre>&lt;!-- virtual hosts
&lt;Set name="virtualHosts"&gt;
	&lt;Array type="String"&gt;
		&lt;Item&gt;www.myVirtualDomain.com&lt;/Item&gt;
		&lt;Item&gt;localhost&lt;/Item&gt;
		&lt;Item&gt;127.0.0.1&lt;/Item&gt;
	&lt;/Array&gt;
&lt;/Set&gt;
--&gt;</pre>
<p></code></p>
<p>Uncomment the block of code and change the item to match the <code>snow.ftd</code> host name like so:</p>
<p><code>
<pre>&lt;!-- virtual hosts --&gt;
&lt;Set name="virtualHosts"&gt;
	&lt;Array type="String"&gt;
		&lt;Item&gt;snow.ftd&lt;/Item&gt;
	&lt;/Array&gt;
&lt;/Set&gt;</pre>
<p></code></p>
<h3>Local Host Setup</h3>
<p>I already posted <a href="http://forthedeveloper.com/2009/local-host-entries-snow-leopard/">instructions for adding local hosts to your Snow Leopard</a>. You can follow the directions there to setup your desired host. In linux you can <a href="http://www.google.com/search?q=linux+hosts+file">modify your hosts file</a> in a similar fashion. There may even be a way to <a href="http://www.google.com/search?q=windows+hosts+file">change your hosts file on windows</a>, although I have never done so.</p>
<h3>Testing</h3>
<p>Once the Jetty config and the local hosts have been updated, restart Railo—if it is running—and go to <code><a href="snow.ftd">snow.ftd:8888</a></code> in your browser. You should see the same page available at <code><a href="localhost:8888">localhost:8888</a></code>.</p>
<p>And you are done! You can now add as many hosts as you need!</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/0vySfxlbRo4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/railo-express-multiple-local-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2009/railo-express-multiple-local-hosts/</feedburner:origLink></item>
		<item>
		<title>Local Host Entries on OS X Snow Leopard</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/D0DeyApT2aM/</link>
		<comments>http://forthedeveloper.com/2009/local-host-entries-snow-leopard/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 03:35:23 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=146</guid>
		<description><![CDATA[Today I wanted to setup local host entries on my MacBook. Searching around I found several articles about editing the /private/etc/hosts file to add local domains entries pointing back to my computer. I don&#8217;t know if it is something that changed with Leopard or Snow Leopard but it just wasn&#8217;t working for me. Even restarting&#8230;]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to setup local host entries on my MacBook. Searching around I found several articles about editing the <code>/private/etc/hosts</code> file to add local domains entries pointing back to my computer. I don&#8217;t know if it is something that changed with Leopard or Snow Leopard but it just wasn&#8217;t working for me. Even restarting the computer was a no go.</p>
<p><span id="more-146"></span></p>
<h3>Using the dscl Utility</h3>
<p>With the wonder of Google searching and the <a href="http://www.andyjarrett.com/blog/index.php/2007/11/1/NetInfo-manager-and-HOST-file-in-Leopard/">generous comments</a> of others I found out about the <code>dscl</code> utility.</p>
<h4>Listing Host Entries</h4>
<p>To see what is listed for your hosts at any time just run this command:</p>
<blockquote><p><code>dscl localhost -readall /Local/Default/Hosts</code></p></blockquote>
<h4>Adding a New Entry</h4>
<p>In this example I am going to have the <code>snow.ftd</code> host point to my <code>127.0.0.1</code> IP address:</p>
<blockquote><p><code>sudo dscl localhost -create /Local/Default/Hosts/snow.ftd IPAddress 127.0.0.1</code></p></blockquote>
<p>You should now be able to <code>ping snow.ftd</code> and have it resolve to your local computer.</p>
<h4>Removing an Existing Entry</h4>
<p>If you decide you do not want an entry anymore just run this command to remove it:</p>
<blockquote><p><code>sudo dscl localhost -delete /Local/Default/Hosts/snow.ftd</code></p></blockquote>
<h4>Reading the BSD Flat File</h4>
<p>It was also noted that you can read the BSD flat file using this command:</p>
<blockquote><p><code>dscl localhost -readall /BSD/local/Hosts</code></p></blockquote>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/D0DeyApT2aM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/local-host-entries-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2009/local-host-entries-snow-leopard/</feedburner:origLink></item>
		<item>
		<title>ColdFusion 9 Ternary Operator Fail</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/qT6-6la-n0M/</link>
		<comments>http://forthedeveloper.com/2009/coldfusion-9-ternary-operator-fail/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 23:27:17 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[adobe]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[cfml]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[operator]]></category>
		<category><![CDATA[ternary]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=140</guid>
		<description><![CDATA[One of the things that I was really excited for in ColdFusion 9 was the support for the ternary operator. As Ben said: To me, the ternary operator is what the IIF() method call always wanted to be. Unfortuately I was testing some CFML code, written and working on Railo, on a ColdFusion 9 server&#8230;]]></description>
			<content:encoded><![CDATA[<p>One of the things that I was really excited for in ColdFusion 9 was the support for the ternary operator. As <a href="http://www.bennadel.com/blog/1643-Learning-ColdFusion-9-The-Ternary-Operator.htm">Ben said</a>:</p>
<blockquote><p>To me, the ternary operator is what the IIF() method call always wanted to be.</p></blockquote>
<p>Unfortuately I was testing some CFML code, written and working on Railo, on a ColdFusion 9 server and had this error pop up:</p>
<blockquote><p><code>Unable to find an operator implementation for coldfusion.compiler.ASToperator</code></p></blockquote>
<p>Turns out the the ternary operator works great&#8230; unless you are using it in a default value for an argument. Fail.</p>
<p><span id="more-140"></span></p>
<p>Here is an example, that should run fine if the ternary operator was doing what it is supposed to:</p>
<pre style="padding-left: 30px;">&lt;cffunction name="testing" access="public" returntype="void" output="false"&gt;
	&lt;cfargument name="test" type="string" default="#(1 EQ 1 ? 'Hi' : 'Bye')#" /&gt;

	&lt;!--- Anything ---&gt;
&lt;/cffunction&gt;</pre>
<p>I have filed it as a bug if you would like to <a href="http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=80610">vote on the issue</a>.</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/qT6-6la-n0M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/coldfusion-9-ternary-operator-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2009/coldfusion-9-ternary-operator-fail/</feedburner:origLink></item>
		<item>
		<title>ColdFusion Development using VirtualBox and Ubuntu 9.10</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/v-2YDTZj7_8/</link>
		<comments>http://forthedeveloper.com/2009/coldfusion-virtualbox-and-ubuntu/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 19:29:41 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=123</guid>
		<description><![CDATA[Here is how I setup a VirtualBox Virtual Machine (VM) running Ubuntu 9.10 Server edition for ColdFusion development on my MacBook Pro. Step 1: Download Needed Files The first step is to download all the files you will need. Since the downloads usually take some time we&#8217;ll get them out of the way first. For&#8230;]]></description>
			<content:encoded><![CDATA[<p>Here is how I setup a <a title="VirtualBox" href="http://www.virtualbox.org/">VirtualBox</a> Virtual Machine (VM) running <a title="Ubuntu" href="http://www.ubuntu.com/">Ubuntu 9.10</a> Server edition for <a title="Adobe ColdFusion" href="http://www.adobe.com/products/coldfusion/">ColdFusion</a> development on my MacBook Pro.</p>
<p><span id="more-123"></span></p>
<h3>Step 1: Download Needed Files</h3>
<p>The first step is to download all the files you will need. Since the downloads usually take some time we&#8217;ll get them out of the way first.</p>
<p>For my installation I wanted to get more familiar with the Server edition of Ubuntu and to require fewer resources. You should be able to do a similar installation with the Desktop edition.</p>
<ul>
<li><strong>Download VirtualBox</strong> &#8211; The <a title="VirtualBox Downloads" href="http://www.virtualbox.org/wiki/Downloads">official VirtualBox download page</a>.</li>
<li><strong>Download Ubuntu</strong> &#8211; To download the Server edition you will need to <a title="Ubuntu Download Mirrors" href="http://www.ubuntu.com/getubuntu/downloadmirrors#mirrors">find a mirror</a> that hosts the installer images. Once you find a mirror navigate to the 9.10 directory and find the download link for the <code>ubuntu-9.10-server-i386.iso</code> file.</li>
<li><strong>Download ColdFusion</strong> &#8211; The <a title="ColdFusion Edition Downloads" href="http://www.adobe.com/products/coldfusion/editions/">official Developer Edition Download</a> is available on the <a title="Adobe ColdFusion" href="http://www.adobe.com/products/coldfusion/">Adobe ColdFusion</a> page. Download the Linux 32 bit installer.</li>
</ul>
<h3>Step 2: Install VirtualBox</h3>
<p>Once you have downloaded all the files, run the VirtualBox installer.</p>
<p>If you would like to learn more about VirtualBox the installation comes with a user manual or you can download a pdf copy from their <a title="VirtualBox Downloads" href="http://www.virtualbox.org/wiki/Downloads">download page</a>.</p>
<h3>Step 3: Create an Ubuntu Virtual Machine</h3>
<p>Click the <code>New</code> icon in VirtualBox to start the wizard for adding a new VM.</p>
<ol>
<li>Click <code>Next</code> to start the wizard.</li>
<li>Enter <code>Ubuntu CF</code> for the <code>Name</code> of the VM.</li>
<li>Select <code>Linux</code> and <code>Ubuntu</code> in the <code>OS Type</code> drop downs.</li>
<li>Click <code>Next</code>.</li>
<li>Click <code>Next</code> to accept the default amount of RAM. (You can adjust if you want to&#8230;)</li>
<li>Click <code>Next</code> to create a new hard disk image to use for the VM.
<ol>
<li>Click <code>Next</code> to start the wizard .</li>
<li>Click <code>Next</code> to create a dynamically expanding storage.</li>
<li>Click <code>Next</code> to accept the default name and size.</li>
<li>Click <code>Finish</code> to accept the choices for the disk image.</li>
</ol>
</li>
<li>Click <code>Finish</code> to end the wizard.</li>
</ol>
<h3>Step 4: Install Ubuntu</h3>
<p>Now that there is a VM setup to hold the guest Ubuntu system we need to install Ubuntu on it.</p>
<p>In VirtualBox Double Click on the <code>Ubuntu CF</code> listed in the left column to start up the VM. Since this is the first time you are starting the VM it will bring a up a First Run Wizard to guide you in setting up the new VM.</p>
<ol>
<li>Click <code>Next</code> to start the wizard.</li>
<li>Change the <code>Media Source</code> to <code>Image File</code> and click the <code>Other...</code> icon.
<ol>
<li>Click the <code>Add</code> icon along the top.</li>
<li>Select the <code>ubuntu-9.10-server-i386.iso</code> file we downloaded earlier.</li>
<li>Click <code>Select</code> with the <code>ubuntu-9.10-server-i386.iso</code> item selected.</li>
</ol>
</li>
<li>Click <code>Next</code> to continue.</li>
<li>Click <code>Finish</code> to end the wizard.</li>
</ol>
<p>The VM should now startup and bring up the installation the Ubuntu. I&#8217;m not going to go into the details of installing Ubuntu here, so just continue with the next step once Ubuntu installation is complete. Also, since we are going to be using apache you may wish to have the setup create a LAMP server configuration when choosing features or you can install it manually afterwards.</p>
<h3>Step 5: Setup Guest Additions</h3>
<p>In order to have the Shared Folders work we will need to install the Guest Additions.</p>
<p>Before we install the Guest Additions we will need to install dkms:</p>
<pre style="padding-left: 30px; ">sudo apt-get install dkms</pre>
<p>To mount the Guest Additions disc image to the VM press <code>Command + D</code> or select <code>Devices &gt; Install Guest Additions...</code> from the VM menu. Then install the Guest Additions by running:</p>
<pre style="padding-left: 30px; ">cd /cdrom</pre>
<pre style="padding-left: 30px; ">sudo sh ./VBoxLinuxAdditions-x86.run</pre>
<h3>Step 6: Setup Shared Folders</h3>
<p>One of the goals when creating the virtual machine was to be able to edit the files natively but run them on the guest operating system that reflects the production environment.</p>
<p>With shared folders we are able to use a local directory as a share on the guest VM.</p>
<p>Before we add the shared folder we need to have a folder to share. For this example I&#8217;m using the directory I created at <code>/Users/randy/Documents/cf9/</code>.</p>
<p>With the VM powered off edit the <code>Settings</code> and select the <code>Shared Folder</code> icon.</p>
<ol>
<li>Click the <code>Add a new shared folder definition</code> icon on the right side.</li>
<li>Enter the <code>Folder Path</code> (<code>/Users/randy/Documents/cf9/</code>) or select <code>Other...</code> from the drop down and locate the directory.</li>
<li>Enter the name you would like the share to be referenced as in the <code>Folder Name</code> field. In this case I am going to call it <code>cf9</code>.</li>
</ol>
<p>Now that we have the shared folder available to the VM we want it to mount the share each time the VM starts. To do this we startup the Ubuntu VM and edit the <code>/etc/fstab</code> file and add the following line at the end of the file (note that you will need to change the username to match your user):</p>
<pre style="padding-left: 30px;"><code>cf9	/home/randy/Documents/cf9	vboxsf	uid=randy,gid=users	0	0</code></pre>
<p>You will also need to create a blank directory at <code>/home/randy/Documents/cf9</code> that the share will mount to.</p>
<p>The next time your VM is started it should have access to <code>/Users/randy/Documents/cf9</code> on the host machine at <code>/home/randy/Documents/cf9</code> on the guest machine.</p>
<h3>Step 7: Enable Port Forwarding</h3>
<p>To setup the port forwarding you will need to stop the VM. In the terminal run the following commands to setup the port forwarding. (Note that <code>"Ubuntu CF"</code> needs to match the name of the VM created above.)</p>
<pre style="padding-left: 30px;"><code>VBoxManage setextradata "Ubuntu CF" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/Protocol" TCP
VBoxManage setextradata "Ubuntu CF" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/GuestPort" 80
VBoxManage setextradata "Ubuntu CF" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/HostPort" 8580</code></pre>
<p>This will change the VM settings to have the guest port of <code>80</code> (which is the default apache port) of the guest forwarded to port <code>8580</code> on the host. Without this you would not be able to talk to the guest operating system.</p>
<h3>Step 8: Install ColdFusion</h3>
<p>Since we already downloaded the installer for ColdFusion we just need to get that file to the VM. Luckily we already setup a shared folder so if you move the installer to the <code>/Users/randy/Documents/cf9/</code> directory it will be available in the VM.</p>
<p>To run the ColdFusion installer:</p>
<pre style="padding-left: 30px; "><code>cd /home/randy/Documents/cf9/</code></pre>
<pre style="padding-left: 30px; "><code>chmod +x ColdFusion_9_WWE_linux.bin</code></pre>
<pre style="padding-left: 30px; "><code>sudo ./ColdFusion_9_WWE_linux.bin</code></pre>
<p>This should start the installer. During the installation, apache should be configured to run with ColdFusion.</p>
<h3>Step 9: Test Environment</h3>
<p>To test that the development environment is working correctly you should be able to place an <code>index.cfm</code> file in your <code>/Users/randy/Documents/cf9/</code> directory. Make sure that you place some CFML in the file to test that ColdFusion is doing it&#8217;s thing. Then visit <a href="http://localhost:8580/">http://localhost:8580/</a> in a browser on your host to test out the new development environment!</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/v-2YDTZj7_8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/coldfusion-virtualbox-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2009/coldfusion-virtualbox-and-ubuntu/</feedburner:origLink></item>
		<item>
		<title>Upgrade Jetty in Railo Express</title>
		<link>http://feedproxy.google.com/~r/ForTheDeveloper/~3/wm8HesaPerQ/</link>
		<comments>http://forthedeveloper.com/2009/upgrade-jetty-in-railo-express/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 18:22:13 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[railo]]></category>
		<category><![CDATA[express]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=118</guid>
		<description><![CDATA[There was a bug in Jetty that was causing MXUnit ant tests to not work because it was double encoding the cookies. The bug was fixed in Jetty but Railo had not released a new Express version with the fix. I found out that it is quite simple to upgrade: Download and unarchive the version of&#8230;]]></description>
			<content:encoded><![CDATA[<p>There was a bug in Jetty that was causing <a href="http://groups.google.com/group/mxunit/browse_thread/thread/debd36e8eddb8341" target="_blank">MXUnit ant tests</a> to not work because it was double encoding the cookies. The bug was fixed in Jetty but Railo had not released a new Express version with the fix.</p>
<p><span id="more-118"></span></p>
<p>I found out that it is quite simple to upgrade:</p>
<ul>
<li><a href="http://docs.codehaus.org/display/JETTY/Downloading+Jetty" target="_blank">Download</a> and unarchive the version of Jetty you are upgrading to (ex: <code>6.1.20</code>).</li>
<li>Stop Railo Express.</li>
<li>Delete the old jetty and jetty-util jars from the Railo Express <code>/lib</code> directory (ex: <code>jetty-6.1.2.jar</code> and <code>jetty-util-6.1.2.jar</code>).</li>
<li>Copy the <code>jetty-6.1.20.jar</code> and the <code>jetty-util-6.1.20.jar</code> from the jetty <code>lib/</code> directory to the Railo Express <code>lib/</code> directory.</li>
<li>Start Railo Express.</li>
</ul>
<p>Not much too it, but it seems to be working just fine and the <a href="http://mxunit.org/" target="_blank">MXUnit</a> ant tasks are now running as expected.</p>
<img src="http://feeds.feedburner.com/~r/ForTheDeveloper/~4/wm8HesaPerQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/upgrade-jetty-in-railo-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://forthedeveloper.com/2009/upgrade-jetty-in-railo-express/</feedburner:origLink></item>
	</channel>
</rss>

