<?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>Shaun Ambrose &#187; Web Development</title>
	<atom:link href="http://www.shaunambrose.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shaunambrose.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 10 Jan 2012 01:39:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Getting VIM setup for Ruby on Rails</title>
		<link>http://www.shaunambrose.com/2011/10/03/getting-vim-setup-for-ruby-on-rails/</link>
		<comments>http://www.shaunambrose.com/2011/10/03/getting-vim-setup-for-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 03:39:31 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=552</guid>
		<description><![CDATA[I just got started using Vim for Ruby on Rails development. Here are some of my notes on how I got started. Please note that this is more of a (rough) guide on how to get Vim setup for Ruby on Rails than it is how to use it. Get Vim First, download/install your flavor [...]]]></description>
			<content:encoded><![CDATA[<p>I just got started using Vim for Ruby on Rails development. Here are some of my notes on how I got started. Please note that this is more of a (rough) guide on how to get Vim setup for Ruby on Rails than it is how to use it.<br />
<span id="more-552"></span></p>
<h3>Get Vim</h3>
<p>First, download/install your flavor of Vim: <a href="http://www.vim.org/download.php">http://www.vim.org/download.php</a></p>
<h3>Create a vimrc file</h3>
<p>Now, before you start editing any files, you&#8217;ll probably want to do some customizations first.</p>
<p>Create a vimrc file: <a href="http://vim.wikia.com/wiki/Open_vimrc_file">http://vim.wikia.com/wiki/Open_vimrc_file</a></p>
<p>In your vimrc you&#8217;ll want to add some basic settings such as the ones below:</p>

<div class="wp_syntax"><div class="code"><pre class="vim" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">&quot; The set nocompatible setting makes vim behave in a more useful way</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">nocompatible</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Enable filetype-specific indenting and plugins</span>
<span style="color: #804040;">filetype</span> <span style="color: #25BB4D;">plugin</span> <span style="color: #25BB4D;">indent</span> <span style="color: #25BB4D;">on</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Turn syntax highlighting on</span>
<span style="color: #804040;">syntax</span> <span style="color: #25BB4D;">on</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Highlight search results</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">hlsearch</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Turn on line numbering</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">number</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Make backspce behave more normally</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">backspace</span>=<span style="color: #25BB4D;">indent</span>,<span style="color: #668080;">eol</span>,start<span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Turn on automatic indenting</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">smartindent</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Insert space characters whenever the tab key is pressed</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">expandtab</span><span style="color: #adadad; font-style: italic;">
&nbsp;
&quot; Set tabs</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">tabstop</span>=<span style="color: #000000; font-weight:bold;">2</span>
<span style="color: #804040;">set</span> <span style="color: #668080;">shiftwidth</span>=<span style="color: #000000; font-weight:bold;">2</span></pre></div></div>

<h3>Create Vim sub-folders</h3>
<p>Inside your .vim (vimfiles on Windows) folder, create some sub-folders for plug-ins and color schemes:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">mkdir</span> -p ~/.vim/autoload
<span style="color: #b1b100; font-weight: bold;">mkdir</span> -p  ~/.vim/bundle
<span style="color: #b1b100; font-weight: bold;">mkdir</span> -p  ~/.vim/colors</pre></div></div>

<h3>Set a default color scheme and font</h3>
<p>After you have your vimrc file, you can customize the look-and-feel of Vim by picking a default color scheme and font.</p>
<p>Here are some good color themes I have found:</p>
<ul>
<li><strong>jellybeans:</strong> <a href="http://www.vim.org/scripts/script.php?script_id=2555">http://www.vim.org/scripts/script.php?script_id=2555</a></li>
<li><strong>railscasts:</strong> <a href="http://www.vim.org/scripts/script.php?script_id=2175">http://www.vim.org/scripts/script.php?script_id=2175</a></li>
<li><strong>vividchalk:</strong> <a href="http://www.vim.org/scripts/script.php?script_id=1891">http://www.vim.org/scripts/script.php?script_id=1891</a></li>
</ul>
<p>The color theme files go in ~/.vim/colors or ~\vimfiles\colors if you&#8217;re on Windows. Then you in your vimrc file you can set your default color scheme:</p>

<div class="wp_syntax"><div class="code"><pre class="vim" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;">&quot; Set default color scheme</span>
<span style="color: #804040;">colorscheme</span> jellybeans</pre></div></div>

<p>It&#8217;s also nice  to have a good programming font in Vim. Here&#8217;s a list of preferred fonts and also how to set a default font in your vimrc file:</p>
<p><a href="http://stackoverflow.com/questions/485174/programming-fonts">http://stackoverflow.com/questions/485174/programming-fonts</a><br />
<a href="http://vim.wikia.com/wiki/Change_font">http://vim.wikia.com/wiki/Change_font</a></p>
<h3>Install plug-ins</h3>
<p>Next, it&#8217;s time to install some plug-ins. Here are some good ones that I have found:</p>
<ul>
<li><a href="https://github.com/tpope/vim-pathogen">https://github.com/tpope/vim-pathogen</a></li>
<li><a href="https://github.com/tpope/vim-rails">https://github.com/tpope/vim-rails</a></li>
<li><a href="https://github.com/tpope/vim-endwise">https://github.com/tpope/vim-endwise</a></li>
<li><a href="https://github.com/tpope/vim-fugitive">https://github.com/tpope/vim-fugitive</a></li>
<li><a href="https://github.com/scrooloose/nerdtree">https://github.com/scrooloose/nerdtree</a></li>
</ul>
<p>I&#8217;m using pathogen to manage my Vim plug-ins, so after that&#8217;s installed, to install a new plug-in, you just navigate to your: ~/.vim/bundle (~\vimfiles\bundle on Windows) directory and run git clone commands to install the new plug-ins:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">git clone git://github.com/tpope/vim-rails.git
git clone git://github.com/tpope/vim-endwise.git
git clone https://github.com/scrooloose/nerdtree.git
git clone git://github.com/tpope/vim-fugitive.git</pre></div></div>

<h3>Summary</h3>
<p>That&#8217;s my rough guide on setting up Vim for Ruby on Rails development. Like I said I just got start using Vim for Ruby on Rails myself, so I know there&#8217;s a lot of plug-ins and settings I haven&#8217;t discovered yet.</p>
<p>Here are some links to the resources I used to setup Vim for Ruby on Rails and also how I&#8217;ve been learning how to learn Git:</p>
<ul>
<li><a href="http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-novice-tutorial-videos/">http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-novice-tutorial-videos/</a></li>
<li>http://oldwiki.rubyonrails.org/rails/pages/HowtoUseVimWithRails</li>
<li><a href="http://net.tutsplus.com/sessions/vim-essential-plugins/">http://net.tutsplus.com/sessions/vim-essential-plugins/</a></li>
<li><a href="http://vimcasts.org/">http://vimcasts.org/</a></li>
<li><a href="http://blog.interlinked.org/tutorials/vim_tutorial.html">http://blog.interlinked.org/tutorials/vim_tutorial.html</a></li>
</ul>
<p>Also, the vimtutor command line program and <a href="http://www.amazon.com/Learning-Vim-Editors-Arnold-Robbins/dp/059652983X">O&#8217;Reilly Vim book</a> came in handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2011/10/03/getting-vim-setup-for-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Methods in Ruby</title>
		<link>http://www.shaunambrose.com/2011/08/18/quick-tip-methods-in-ruby/</link>
		<comments>http://www.shaunambrose.com/2011/08/18/quick-tip-methods-in-ruby/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 05:29:05 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=548</guid>
		<description><![CDATA[Here are some quick tips to keep in mind when coding new methods in Ruby. Each method should be short and focused on doing one thing. Each method should be well named, the method name should reflect what the method does. Each method should operate at a single conceptual level. Methods shouldn&#8217;t be doing both [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some quick tips to keep in mind when coding new methods in Ruby.<br />
<span id="more-548"></span></p>
<li>Each method should be short and focused on doing one thing.</li>
<li>Each method should be well named, the method name should reflect what the method does.</li>
<li>Each method should operate at a single conceptual level. Methods shouldn&#8217;t be doing both low level logic and high level logic.</li>
<p>I&#8217;ve learned that keeping your Ruby methods well named, short and focused makes them easier to read and also easier to test.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2011/08/18/quick-tip-methods-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix the &#8220;msvcrt-ruby18.dll is missing from your computer&#8221; error message in Ruby on Rails</title>
		<link>http://www.shaunambrose.com/2010/11/11/how-to-fix-the-msvcrt-ruby18-dll-is-missing-from-your-computer-error-message-in-ruby-on-rails/</link>
		<comments>http://www.shaunambrose.com/2010/11/11/how-to-fix-the-msvcrt-ruby18-dll-is-missing-from-your-computer-error-message-in-ruby-on-rails/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 19:09:30 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=465</guid>
		<description><![CDATA[Here&#8217;s how to fix that annoying Ruby on Rails popup message: &#8220;The program can&#8217;t start because msvcrt-ruby18.dll is missing from your computer. Try reinstalling the program to fix this problem.&#8221; This fix applies if you&#8217;re using cucumber on Windows. It turns out the error message is related to the json gem that cucumber depends on. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to fix that annoying Ruby on Rails popup message: &#8220;The program can&#8217;t start because msvcrt-ruby18.dll is missing from your computer. Try reinstalling the program to fix this problem.&#8221;</p>
<p>This fix applies if you&#8217;re using cucumber on Windows.<br />
<span id="more-465"></span><br />
It turns out the error message is related to the json gem that cucumber depends on. The details and solution are buried in this <a href="http://groups.google.com/group/rubyinstaller/browse_thread/thread/7f96baf7e80d30d8/3145b2ea94697e44">thread</a>.</p>
<p>To fix it, you just have to run:</p>
<pre>
<code>
gem uninstall json</code></pre>
<p>followed by:</p>
<pre>
<code>
gem install json --platform=ruby
</pre>
<p></code></p>
<p>Notes:<br />
You need to have DevKit installed for this fix: <a href="https://github.com/oneclick/rubyinstaller/wiki/Development-Kit">https://github.com/oneclick/rubyinstaller/wiki/Development-Kit</a></p>
<p>If you get an error when installing the new json gem, make sure a rails server or console isn't running in the background.</p>
<p>The offending version of json for me was 1.4.6-x86-mingw32, so you need to uninstall and install that version: gem install json --version=1.4.6 --platform=ruby</p>
<p>If you install new gems after you make this fix, the error message will pop-up again, so you'll have to uninstall/install the json gem again. If anyone knows a way around this, please let me know.</p>
<p>Anyway, I hope this fix is helpful, that error was driving me nuts!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2010/11/11/how-to-fix-the-msvcrt-ruby18-dll-is-missing-from-your-computer-error-message-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to create a virtual directory in Apache</title>
		<link>http://www.shaunambrose.com/2010/10/01/how-to-create-a-virtual-directory-in-apache/</link>
		<comments>http://www.shaunambrose.com/2010/10/01/how-to-create-a-virtual-directory-in-apache/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 22:45:10 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=443</guid>
		<description><![CDATA[Suppose you&#8217;re working on your local machine. You&#8217;re running Apache/PHP or an all-on-one package like XAMPP. You have a bunch of websites, but you don&#8217;t want to store them all under Apache&#8217;s webroot. Maybe some of your websites use PHP and you want to test them locally in your browser. Here&#8217;s how to map a [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you&#8217;re working on your local machine. You&#8217;re running Apache/PHP or an all-on-one package like XAMPP. You have a bunch of websites, but you don&#8217;t want to store them all under Apache&#8217;s webroot. Maybe some of your websites use PHP and you want to test them locally in your browser.</p>
<p>Here&#8217;s how to map a directory so you can access it via Apache without it being in the webroot.<br />
<span id="more-443"></span><br />
Add this to your httpd.conf file:</p>
<pre>
<code>
&lt;IfModule alias_module&gt;
  Alias /myphpsite/ "D:/websites/myphpsite/"

  &lt;Directory "D:/websites/myphpsite/"&gt;
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride all
    Order allow,deny
    Allow from all
  &lt;/Directory&gt;
&lt;/IfModule&gt;
</code></pre>
<p>Just update &#8220;myphpsite&#8221; with your own alias and update &#8220;D:/websites/myphpsite/&#8221; with the drive/directory of the actual site. I tested this using Apache2.2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2010/10/01/how-to-create-a-virtual-directory-in-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix a “sqlite3.dll missing” error message in Ruby on Rails</title>
		<link>http://www.shaunambrose.com/2010/08/05/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails/</link>
		<comments>http://www.shaunambrose.com/2010/08/05/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 20:10:35 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[how to]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=433</guid>
		<description><![CDATA[Here&#8217;s a little reminder for myself on how I fixed the &#8220;sqlite3.dll missing&#8221; error message I was getting while setting up a new Ruby on Rails environment. First, I downloaded the latest SQlite3 DLL. (I grabbed the DLL of the SQLite library without the TCL bindings.) Then, I exracted the .dll and .def files to [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little reminder for myself on how I fixed the &#8220;sqlite3.dll missing&#8221; error message I was getting while setting up a new Ruby on Rails environment.<br />
<span id="more-433"></span></p>
<p>First, I downloaded the latest <a href="http://www.sqlite.org/download.html">SQlite3 DLL.</a> (I grabbed the DLL of the SQLite library without the TCL bindings.)</p>
<p>Then, I exracted the .dll and .def files to my C:\ruby\bin directory and that fixed my issue. (You&#8217;ll might have to restart your console session.) </p>
<p>These steps will also fix this error message:<br />
&#8220;The procedure entry point sqlite3_column_database_name could not be located in the dynamic link library sqlite3.dll.&#8221;</p>
<p>Hope this helps someone else running into the same issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2010/08/05/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>How to create migrations in Ruby on Rails that only run in the development enviroment</title>
		<link>http://www.shaunambrose.com/2010/02/13/how-to-create-migrations-in-ruby-on-rails-that-only-run-in-the-development-enviroment/</link>
		<comments>http://www.shaunambrose.com/2010/02/13/how-to-create-migrations-in-ruby-on-rails-that-only-run-in-the-development-enviroment/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 06:52:17 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[how to]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=371</guid>
		<description><![CDATA[This is a reminder for myself for when I want to use a migration to create test data for the development environment only. I thought it would be as easy as using the environment variable ENV['RAILS_ENV'] in the migration to see which environment you&#8217;re in, but this doesn&#8217;t work. After a little searching, it is [...]]]></description>
			<content:encoded><![CDATA[<p>This is a reminder for myself for when I want to use a migration to create test data for the development environment only.<br />
<span id="more-371"></span><br />
I thought it would be as easy as using the environment variable <strong>ENV['RAILS_ENV']</strong> in the migration to see which environment you&#8217;re in, but this doesn&#8217;t work. After a little searching, it is as easy as I thought; you just have to use the constant <strong>RAILS_ENV</strong>. So, your migration would look something like this:</p>
<pre><code>
def self.up
  if RAILS_ENV == 'development'
    # set all of your test data for development...
  end
end
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2010/02/13/how-to-create-migrations-in-ruby-on-rails-that-only-run-in-the-development-enviroment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to add a delay to a jQuery animation</title>
		<link>http://www.shaunambrose.com/2010/01/15/how-to-add-a-delay-to-a-jquery-animation/</link>
		<comments>http://www.shaunambrose.com/2010/01/15/how-to-add-a-delay-to-a-jquery-animation/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 21:41:32 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=205</guid>
		<description><![CDATA[A couple of days ago, I was looking for a way to add a pause after an animation was triggered. This was before jQuery 1.4 was released. I found a couple of solutions including using the javascript function setTimeout or some people would imitate a delay by setting an animation for the desired number of [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago, I was looking for a way to add a pause after an animation was triggered. This was before jQuery 1.4 was released. I found a couple of solutions including using the javascript function setTimeout or some people would imitate a delay by setting an animation for the desired number of seconds that doesn&#8217;t change anything. Something like this&#8230;</p>
<p><span id="more-205"></span></p>
<pre>
<code>
$("#box1").fadeTo(1000, 0).fadeTo(3000, 0).fadeTo(1000, 1);
</code>
</pre>
<p>This will fade out an element in 1 second, then it will &#8220;pause&#8221; by setting another animation for 3 seconds that doesn&#8217;t change anything, then it will change it back to 100% opacity. It&#8217;s kind of an awkward way to do it.</p>
<p>But now with jQuery 1.4, things are a lot easier. You just need to just need to use the delay() function. Like so&#8230;</p>
<pre>
<code>
$("#box2").fadeTo(1000, 0).delay(3000).fadeTo(1000, 1);
</code>
</pre>
<div style="width:40px; height:40px; background:#c78b8b; border:1px solid #4f4f4f;" onclick="$(this).fadeTo(1000, 0).delay(3000).fadeTo(1000, 1);"></div>
<p>Click on the box and notice there is a 3 second delay after the box fades out, before it reappears. Visually, the effect looks exactly the same before the delay() function was introduced, but the code is nicer now.</p>
<p><br clear="none" />To set the delay before an animation fires, do this&#8230;</p>
<pre>
<code>
$("#box3").delay(3000).fadeTo(1000, .1);
</code>
</pre>
<p>Now there will be a 3 second delay before the box fades:</p>
<div style="width:40px; height:40px; background:#c78b8b; border:1px solid #4f4f4f;" onclick="$(this).delay(3000).fadeTo(1000, .1);"></div>
<p><br clear="none" />Or if you want to set the delay after an animation fires. Like a delay before your next lines of code are fired, do something like this&#8230; (I&#8217;m not sure if this is the best way, but it&#8217;ll work.)</p>
<pre>
<code>
$("#box4").fadeTo(1000, .1).delay(3000).fadeTo(1, .1);
</code>
</pre>
<p>And that&#8217;s all there is too it. To read more about the delay() function, <a href="http://api.jquery.com/delay/">check out the jQuery documentation.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2010/01/15/how-to-add-a-delay-to-a-jquery-animation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to integrate SVN into ANT</title>
		<link>http://www.shaunambrose.com/2009/07/28/how-to-integrate-svn-into-ant/</link>
		<comments>http://www.shaunambrose.com/2009/07/28/how-to-integrate-svn-into-ant/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 03:34:34 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=161</guid>
		<description><![CDATA[Here&#8217;s an easy way to checkout code from a Subversion repository (or do any Subversion related task) using Ant. After you have Ant installed, you&#8217;ll need a SVN command line client. You can download a program like Slik SVN for this functionality. After you have both Ant and SVN working. You can do something like [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an easy way to checkout code from a Subversion repository (or do any Subversion related task) using Ant. </p>
<p><span id="more-161"></span><br />
After you have Ant installed, you&#8217;ll need a SVN command line client. You can download a program like <a href="http://www.sliksvn.com/en/">Slik SVN</a> for this functionality. After you have both Ant and SVN working. You can do something like this&#8230;</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project name="MyProject" basedir="."&gt;
  &lt;description&gt;
    This build file will check out your code from a SVN repository.
  &lt;/description&gt;

  &lt;exec executable="svn"&gt;
    &lt;arg line="checkout http://www.example.com/svn/project/
       --username test --password password"/&gt;
  &lt;/exec&gt;
&lt;/project&gt;
</code></pre>
<p>That&#8217;s all there is to it. Check out the <a href="http://svnbook.red-bean.com/en/1.5/svn.ref.html">Subversion Complete Reference</a> for all the SVN commmands.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2009/07/28/how-to-integrate-svn-into-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Login vs Log In</title>
		<link>http://www.shaunambrose.com/2009/04/05/login-vs-log-in/</link>
		<comments>http://www.shaunambrose.com/2009/04/05/login-vs-log-in/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 21:27:25 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=135</guid>
		<description><![CDATA[A lot of popular web apps make the mistake of using the term &#8220;Login,&#8221; when instructing users to log in. Don&#8217;t use the term &#8220;Login,&#8221; that&#8217;s wrong! You want the user to preform an action and &#8220;Login&#8221; is not an action, it&#8217;s a noun. &#8220;Login&#8221; can be used to reference the &#8220;login interface.&#8221; But for [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of popular web apps make the mistake of using the term &#8220;Login,&#8221; when instructing users to log in. Don&#8217;t use the term &#8220;Login,&#8221; that&#8217;s wrong!</p>
<p><span id="more-135"></span><br />
<img src="http://www.shaunambrose.com/wp-content/uploads/2009/04/login.png" alt="Don&#039;t use the term Login." title="Don&#039;t use the term Login." width="375" height="224" class="alignnone size-full wp-image-136" /></p>
<p>You want the user to preform an action and &#8220;Login&#8221; is not an action, it&#8217;s a noun. &#8220;Login&#8221; can be used to reference the &#8220;login interface.&#8221; But for the action of logging in, use the phrase &#8220;Log In&#8221; instead.</p>
<p><img src="http://www.shaunambrose.com/wp-content/uploads/2009/04/log-in.png" alt="Use the term Log In!" title="Use the term Log In!" width="375" height="224" class="alignnone size-full wp-image-137" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2009/04/05/login-vs-log-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add HTML content to the DOM using Prototype</title>
		<link>http://www.shaunambrose.com/2008/10/13/how-to-add-html-content-to-the-dom-using-prototype/</link>
		<comments>http://www.shaunambrose.com/2008/10/13/how-to-add-html-content-to-the-dom-using-prototype/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 07:55:02 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=59</guid>
		<description><![CDATA[See that red beetle in the upper-right hand corner? I create that after the page loads, using Prototype. In fact, all the auxillary content in the header is created after the page loads. It&#8217;s not site content and it&#8217;s not navigation; it&#8217;s just for fun, so why load it before the &#8220;real&#8221; content, right?! Ok, [...]]]></description>
			<content:encoded><![CDATA[<p>See that red beetle in the upper-right hand corner? I create that after the page loads, using Prototype. In fact, all the auxillary content in the header is created after the page loads. It&#8217;s not site content and it&#8217;s not navigation; it&#8217;s just for fun, so why load it before the &#8220;real&#8221; content, right?!</p>
<p>Ok, first, to add content using Prototype, I recommend that you already know or have the content you want to add to the DOM. For example, I wanted to add that red beetle to the DOM using Prototype. I already had the HTML coded up and here&#8217;s what it looked like&#8230;</p>
<pre><code>&lt;a href="#" onclick="beetles(); return false;"&gt;
  &lt;img src="/images/beetle1.png" alt="" id="beetle1" border="0" /&gt;
&lt;/a&gt;</code></pre>
<p>It&#8217;s a lot easier if you know and have the HTML code you&#8217;re trying to duplicate in Prototype. So, to add this content to the DOM after the page has loaded, we use the following Prototype functions: <a href="http://prototypejs.org/api/element">Element constructor</a>, <a href="http://prototypejs.org/api/element/insert">Element.insert</a>, <a href="http://prototypejs.org/api/element/update">Element.update</a> and <a href="http://prototypejs.org/api/document/observe">document.observe</a>. And here&#8217;s what the Prototype code looks like&#8230;</p>
<pre><code>document.observe('dom:loaded', function() {
var linkBeetle1 = new Element('a', {
  href: '#',
  onclick: 'beetles(); return false;'
});

var beetle1 = new Element('img', {
  src: '/images/beetle1.png',
  id: 'beetle1',
  alt: '',
  border: '0',
});

linkBeetle1.update(beetle1);
$('header').insert(linkBeetle1);
};
</code></pre>
<p><strong>new Element</strong> &#8211; creates a new HTML element with the provided attributes.</p>
<p><strong>.update</strong> &#8211; updates/replaces the content of the element with the provided content. In this case, we&#8217;re attaching the &lt;img&gt; to the &lt;a href&gt; tag.</p>
<p><strong>.insert</strong> &#8211; attaches the newly created element into the document to the element you specify.</p>
<p><strong>document.observe(&#8216;dom:loaded&#8217;&#8230;</strong> &#8211; this will make it so that the content is loaded after the page has been loaded (but before the images are loaded).</p>
<p>And that&#8217;s all there is to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/2008/10/13/how-to-add-html-content-to-the-dom-using-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

