<?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>My name is Joel &#187; Web Development</title>
	<atom:link href="http://joeloliveira.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://joeloliveira.com</link>
	<description>I work on the web making stuff I like. I live in Boston(-ish) with my wife and our English Bulldog.</description>
	<lastBuildDate>Tue, 03 Aug 2010 16:28:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Debugging in Cucumber</title>
		<link>http://joeloliveira.com/2010/07/17/debugging-in-cucumber/</link>
		<comments>http://joeloliveira.com/2010/07/17/debugging-in-cucumber/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 22:49:47 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/?p=830</guid>
		<description><![CDATA[As a relative newb&#8217; to cucumber I realize there&#8217;s a lot to get caught up on. The one thing I do know is that there&#8217;s a lot that I don&#8217;t know. Having said that, when I run into a barrier or an issue and I want to dig into the source to figure things out, [...]]]></description>
			<content:encoded><![CDATA[<p>As a relative newb&#8217; to <a href="http://cukes.info">cucumber</a> I realize there&#8217;s a lot to get caught up on.  The one thing I <strong>do</strong> know is that there&#8217;s a lot that I don&#8217;t know.   Having said that, when I run into a barrier or an issue and I want to dig into the source to figure things out, what do you do?</p>
<p>You break out <em>ruby-debug</em>, of course.</p>
<p>Add <em>require &#8216;ruby-debug&#8217;</em> to features/support/env.rb and throw a breakpoint into your step definitions.</p>
<p>That&#8217;s all well and good, and it works just fine.  But what do you look for while you&#8217;re in there?   I spent the better part of an evening looking for how I could sniff around the html source cucumber was testing against and couldn&#8217;t find it.  Lots of searching for how to pear into @response and @request &#8211; which end up being nil as far as I can see.  </p>
<p>I had no idea.</p>
<p>Until I read <a href="http://theled.co.uk/blog/archive/2010/07/17/how-we-added-automated-html-validation-to-our-web-development-process/" target="_blank">this post from the LoED</a> on how to test your source&#8217;s validity.  In there was the answer:</p>
<p><em>page.body</em></p>
<p>Eureka!</p>
<p>Baby steps.  I&#8217;ll figure this all out yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2010/07/17/debugging-in-cucumber/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>rvm, ree, nginx and phusion passenger</title>
		<link>http://joeloliveira.com/2010/03/12/rvm-ree-nginx-and-phusion-passenger/</link>
		<comments>http://joeloliveira.com/2010/03/12/rvm-ree-nginx-and-phusion-passenger/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 18:08:13 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/?p=816</guid>
		<description><![CDATA[A production web / application server that I maintain has been around for mostly wordpress and static sites we host for some of our clients. Soon, however, the need for some Rails-based client sites will be popping up for us over there. Traditionally the set-up for those apps have been in clients&#8217; own hosting environments, [...]]]></description>
			<content:encoded><![CDATA[<p>A production web / application server that I maintain has been around for mostly wordpress and static sites we host for some of our clients.  Soon, however, the need for some Rails-based client sites will be popping up for us over there.  Traditionally the set-up for those apps have been in clients&#8217; own hosting environments, or were apps I hosted in a dedicated app-server slice of my own.   So, the need crept up, and now I&#8217;m left planning for now, and the future.  And what is that future, you might ask (ok, probably not)?  Rails 3, of course.    </p>
<p>The baseline reference implementation  for Rails 3, as I know it, is 1.8.7, but has been tested to work with Ruby 1.9, and also functions properly with Phusion&#8217;s Ruby Enterprise Edition (henceforth known as REE).   To say that Ruby is in a transition phase is an understatement.   The community has been hard at work trying to get gems, frameworks, their associated plugins, etc, to work with all of the new shiny ruby-based toys.   In order to accurately test, the RVM project has stepped up as the solution for testing and developing across multiple Ruby interpreters.    </p>
<p>New server setup, quickly moving innovation, growth and change &#8230; all of these point me in one direction &#8211; drinking the RVM kool-aid and getting right into it.  But not without a few hiccups.   Here are my steps in getting things rolling with rvm, nginx, ree and passenger.</p>
<p><strong>Note:</strong> Don&#8217;t install nginx at first thinking that passenger will end up being installed as a plugin, or module.  I wasted some time in doing that.  When you go through the process of installing passenger it&#8217;ll ask to compile and re-install nginx.  So we&#8217;ll get to that eventually.</p>
<p>To get everything compiling as I wanted I had to install a handful of obvious, and not-so-obvious, packages and libraries.  To wit: </p>
<blockquote><p>sudo apt-get install ruby-full build-essential curl libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev libgcrypt11 libgcrypt11-dev bison libreadline5-dev</p></blockquote>
<p><small>Your mileage may vary.</small></p>
<p>Also, the irony doesn&#8217;t escape me that we needed to install ruby, &#8220;ruby-full&#8221;, in order to install a bunch of other rubies.  But hey, whatever.</p>
<p><strong>Install rvm</strong>.  It&#8217;s as easy as <a href="http://rvm.beginrescueend.com/rvm/install/">following the instructions at the RVM site</a>.  I chose to go the gem route.  Follow the instructions as are given and things will be fine.  The only hiccups I had involved some libraries that are taken care of in the above package installs.</p>
<p><strong>Install the versions of ruby you&#8217;d like</strong>.  <em>rvm install 1.8.6,1.8.7-head,ree,1.9.1</em></p>
<p>According to fellow boston.rb&#8217;ist @<a href="http://twitter.com/techiferous">techiferous</a> we use 1.8.7-head, because</p>
<blockquote><p><a href="http://twitter.com/techiferous/status/8751925362">#</a> Rails 3 needs Ruby 1.8.7. Use rvm to manage Ruby versions. Do &#8220;rvm ruby-1.8.7-head&#8221; NOT ruby-1.8.7-p249 (broken gems).</p></blockquote>
<p>After some time compiling and wrangling everything together you should have a handful of different rubies at your disposal.  Please visit the rvm site for examples, use cases and general information.  It&#8217;s worth your time.  </p>
<p>At this point I switched to ruby-ree in preparation of the passenger and nginx install.  <em>rvm ree</em>.  A quick <em>ruby &#8211;version</em> now tells us that we&#8217;re running <em>ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0&#215;6770, Ruby Enterprise Edition 2010.01</em>. </p>
<p><strong>Install Passenger and Nginx</strong>.  <em>gem install passenger &#038;&#038; rvmsudo passenger-install-nginx-module</em> will get you started.  Here&#8217;s where the install of Nginx goes down, as noted in the text after you run the command: </p>
<blockquote><p>Nginx doesn&#8217;t support loadable modules such as some other web servers do,<br />
so in order to install Nginx with Passenger support, it must be recompiled.</p></blockquote>
<p>I chose to customize my own install and selected the second option.   Do whatever you&#8217;re most comfortable with.  I prefer to have my compiled source in /opt/local, but again, it&#8217;s all a matter of preference.   After some more compiling, we were all done and have a newly compiled install of Nginx, with Passenger, Utilizing the REE ruby interpreter.</p>
<p>Last but not least, go thank <a href="http://twitter.com/wayneeseguin">Wayne Seguin</a> for the work on RVM.  Amazing work!</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2010/03/12/rvm-ree-nginx-and-phusion-passenger/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>From the Ruby Noob Dept: Issue(s) with accepts_nested_attributes_for</title>
		<link>http://joeloliveira.com/2010/02/27/from-the-ruby-noob-dept-accepts_nested_attributes_for-issues/</link>
		<comments>http://joeloliveira.com/2010/02/27/from-the-ruby-noob-dept-accepts_nested_attributes_for-issues/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 23:03:25 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/?p=810</guid>
		<description><![CDATA[Finally took some time to jump in and refactor some nested forms at Thredded using Rails 2.3&#8242;s accepts_nested_attributes_for. Thanks to Ryan Bates&#8217; screencasts on the topic it was fairly easy. A little code cleanup and everything worked as it should &#8230; other than one thing. Can&#8217;t mass-assign these protected attributes Noticed that error in my [...]]]></description>
			<content:encoded><![CDATA[<p>Finally took some time to jump in and refactor some nested forms at <a href="http://thredded.com">Thredded</a> using Rails 2.3&#8242;s accepts_nested_attributes_for.  Thanks to <a href="http://railscasts.com/episodes?search=nested+forms">Ryan Bates&#8217; screencasts</a> on the topic it was fairly easy.  A little code cleanup and everything worked as it should &#8230; other than <em>one thing</em>.</p>
<p><strong>Can&#8217;t mass-assign these protected attributes</strong></p>
<p>Noticed that error in my development logfiles after a particular form wasn&#8217;t being saved.   A User class had some protected, and some not, attributes and until I added the Profile attributes to it, the nested form submitting a User and it&#8217;s associated Profile record would not save.</p>
<pre class="prettyprint lang-ruby">
class User < ActiveRecord::Base
  has_one  :profile
  accepts_nested_attributes_for :profile
  attr_accessible :login, :email, :password, :password_confirmation
  # ...
end</pre><p>Needed just the Profile attributes set as accessible and ready for mass assignment</p>
<pre class="prettyprint lang-ruby">
class User < ActiveRecord::Base
  has_one  :profile
  accepts_nested_attributes_for :profile
  attr_accessible :login, :email, :password, :password_confirmation, :profile_attributes
  # ...
end</pre><p>Another case where you need to know at all times where and if properties of your classes are locked down or not.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2010/02/27/from-the-ruby-noob-dept-accepts_nested_attributes_for-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sassy-pants</title>
		<link>http://joeloliveira.com/2010/02/25/sassy-pants/</link>
		<comments>http://joeloliveira.com/2010/02/25/sassy-pants/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 16:57:15 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/?p=789</guid>
		<description><![CDATA[I&#8217;m pretty set in my ways professionally these days, so it&#8217;s hard sometimes to make a shift from what I&#8217;m comfortable with to a methodology that&#8217;s contrary to something that still works. Like CSS &#8211; what the what needs to change in my work-flow regarding CSS at this point? I&#8217;m more than comfortable with box-models, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.joeloliveira.com/wp-content/uploads/2010/02/sassy.jpg" alt="" title="sassy" width="590" class="aligncenter size-full wp-image-807" /></p>
<p>I&#8217;m pretty set in my ways professionally these days, so it&#8217;s hard sometimes to make a shift from what I&#8217;m comfortable with to a methodology that&#8217;s contrary to something that still works.</p>
<p>Like <a href="http://www.w3.org/Style/CSS/">CSS</a> &#8211; what the <em>what</em> needs to change in my work-flow regarding CSS at this point?  I&#8217;m more than comfortable with box-models, browser hacks, sprites, peek-a-boo and double-float margin bugs.   Waking up one day and thinking &#8211; &#8220;I could be better&#8221; was the kick in the pants to try something new.   Enter <a href="http://sass-lang.com/">Sass</a>.</p>
<blockquote><p>Sass is a meta-language on top of CSS that’s used to describe the style of a document cleanly and structurally, with more power than flat CSS allows. Sass both provides a simpler, more elegant syntax for CSS and implements various features that are useful for creating manageable stylesheets.</p></blockquote>
<p>I won&#8217;t go into the syntactic sugar that makes Sass so much fun &#8211; <a href="http://wiseheartdesign.com/articles/2010/01/18/the-demise-of-css-why-sass-and-languages-like-it-will-triumph/">John Long</a> [<a href="http://wiseheartdesign.com/articles/2010/01/21/better-debugging-with-sass-and-line-comments/">1</a>] [<a href="http://wiseheartdesign.com/articles/2010/01/22/structuring-a-sass-project/">2</a>] and <a href="http://www.darowski.com/tracesofinspiration/2010/01/11/this-newbies-first-impressions-of-haml-and-sass/">Adam Darowski</a> have already done excellent jobs rounding up the high, and lower, level concepts and tricks.  I highly recommend visiting and bookmarking those links for future reference.</p>
<p>A few things I&#8217;ve bumped into, however, that bear mentioning here involve a few tools and code snippets that I went looking for as I went down that sassy path.   The first being <a href="http://github.com/adamstac/ruby-sass-tmbundle">a Textmate bundle for sass</a> I found to help out during rapid and uninterrupted development.  The syntax highlights are, of course, fantastic, but the killer feature is easily the quick CSS generation keyboard shortcut.  Command-R will parse and generate your CSS file right there from inside Textmate.  If there are any issues a tool-tip will pop up with the error.  If you switch over and reload your browser too fast to see the tool-tip you&#8217;ll see an unstyled page &#8211; a big honking notice that you were doin&#8217; it wrong. </p>
<p>The few bits of code, of many, that I needed to find, or create, quickly before getting down to business &#8211; Eric Meyer&#8217;s reset stylesheet, and maybe a mixin or two that I&#8217;m quick to use in a pinch &#8211; like <em>.clearfix</em>.</p>
<pre class="prettyprint lang-css">// Reset

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td
  :margin 0
  :padding 0
  :border 0
  :outline 0
  :font-size 100%
  :vertical-align baseline
  :background transparent

body
  :line-height 1

ol, ul
  :list-style none

blockquote, q
  :quotes none

// remember to define focus styles!
\:focus 
  :outline 0

ins
  :text-decoration none 
// remember to highlight inserts somehow!

del
  :text-decoration line-through

table
  :border-collapse collapse
  :border-spacing 0

// ----------- Clearfix --------------- 

.clearfix
  *display:                 inline-block
  &#038;:after
    content:                " "
    display:                block
    height:                 0
    clear:                  both
    visibility:             hidden
 
// ----------- Clearfix as mixin --------------- 

=clearfix
  *display:                 inline-block
  &#038;:after
    content:                " "
    display:                block
    height:                 0
    clear:                  both
    visibility:             hidden</pre><p>Those are two solid examples of how easy it is to just jump right in.  So give it a shot &#8211; `sudo gem install haml` to install what you need, and get to <del datetime="2010-02-25T16:52:03+00:00">work</del> playing.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2010/02/25/sassy-pants/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tips for developing HTML emails</title>
		<link>http://joeloliveira.com/2010/01/15/tips-for-developing-html-emails/</link>
		<comments>http://joeloliveira.com/2010/01/15/tips-for-developing-html-emails/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 22:20:03 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/?p=771</guid>
		<description><![CDATA[Option 1 &#8211; Don&#8217;t do it. And if that&#8217;s not on the table (haha &#8211; get it?), I present to you &#8230; Option 2 &#8211; With a few things in mind when you approach the assignment you&#8217;ll get through it. It might not be the most fun, but it&#8217;s all doable. My first suggestion would [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-774" title="nested tables" src="http://www.joeloliveira.com/wp-content/uploads/2010/01/140341-main_Full-e1263592316562.jpg" alt="Nested tables FTL" width="250" height="272" /><br />
<strong>Option 1 &#8211; Don&#8217;t do it.</strong></p>
<p>And if that&#8217;s not on the table (haha &#8211; get it?),  I present to you &#8230;</p>
<p><strong>Option 2 &#8211; With a few things in mind when you approach the assignment you&#8217;ll get through it.   It might not be the most fun, but it&#8217;s all doable.</strong></p>
<p>My first suggestion would be to take whatever time you estimated, and double it.  Maybe triple it.  If you&#8217;re reading this post in its entirety then I&#8217;m guessing it&#8217;s safe to assume these HTML emails aren&#8217;t a daily routine for you.  If such is the case, the time it&#8217;ll take between your first &lt;table&gt; tag, and the moment the email is <span style="text-decoration: line-through;">spammed</span> sent out will not be insignificant &#8211; 2-3 times the markup, 2-3 times the complexity in testing esoteric email clients.  Your mileage may vary, depending on what the targeted visual design is.  It&#8217;s always up to your discretion &#8211; but the one thing I didn&#8217;t anticipate, that I know is a rule, not an exception, is the time you spend on the testing process.</p>
<p>Before starting &#8211; these are the things you should have up front to make your life semi-easier.</p>
<ol>
<li><strong>Create test accounts at gmail, hotmail, yahoo mail, and AOL.</strong> Except you can probably ignore AOL out of principle.  I felt <em>dirty</em> just typing that.  As with most things related to this practice &#8211; having to maintain test accounts at these email services is usually more trouble than it&#8217;s worth, but save yourself time and pain by using some sort of password database, such as <a href="http://agilewebsolutions.com/products/1Password">1password</a>.  Remembering passwords isn&#8217;t the hassle here &#8211; it&#8217;s the random usernames you&#8217;re going have to pull out of thin air, which you&#8217;ll end up using <strong>very</strong> infrequently.  Trust me.</li>
<li><strong>An account at an email campaign website like <a href="http://www.campaignmonitor.com">CampaignMonitor</a> or <a href="http://mailchimp.com">MailChimp</a>.</strong> I&#8217;m a big fan of, and more prone to recommend, MailChimp not only for their pricing and offerings but the user experience throughout.  It&#8217;s on my short list of sites that are actually fun to use &#8211; as silly as that may sound.  Why Mailchimp?  You can set up a sample campaign, point to your code on your webhost of choice, and send emails using the code hosted out there in the wild.</li>
<li><strong>A virtual machine with Windows, and the latest version of Office.</strong> This one&#8217;s a given as most emails sent for B2B purposes will end up in MS Outlook.  As of right now the latest is Office 2007, whose changes to how html emails are rendered are the single reason to pack up and go home if you can.  Want more info? <a href="http://www.google.com/search?q=html+emails+outlook+2007&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t">Here you go</a>.  Office costs money, obviously, but if you don&#8217;t plan on doing too many of these html emails, <a href="http://us20.trymicrosoftoffice.com/default.aspx?culture=en-US">there&#8217;s a free download at Microsoft&#8217;s</a> that you can use as a trial for 90 days or so.  Otherwise, purchase your copy legit &#8230; or find somewhere that will assist you in a &#8230; *cough* &#8230; longer &#8220;<em>trial period</em>&#8220;.</li>
<li><strong>If it&#8217;s in the budget &#8211; sign up for a screenshot generator.</strong> If you&#8217;re tasked with testing your table-bloated masterpiece in more obscure email clients &#8211; Lotus, or Lotus Notes &#8211; whatever it&#8217;s called.  Outlook 2003.  The aforementioned AOL.  You might want to invest in an account at one of the screenshot generator testing sites like <a href="http://browsercam.com">BrowserCam</a>, <a href="http://litmusapp.com/">Litmus</a> or <a href="http://www.campaignmonitor.com/features/make-and-send-great-looking-emails/">CampaignMonitor</a>.  Of those three I only plunked money down to try CampaignMonitor &#8211; which worked, but the screenshots were of varying quality.  Some were half-generated.  One looked like someone hit &#8220;ctrl-A&#8221; before the screenshot was taken.  Very odd, but it did the trick to somewhat guess how things were looking.  If I were to try any of those others instead I would probably go with Litmus.  Again &#8211; <a href="http://en.wiktionary.org/wiki/your_mileage_may_vary">ymmv</a>.</li>
</ol>
<p>The following are the gotchas and tips I&#8217;ve become familiar with recently through the course of developing a handful of these emails.  These somewhat defy the logic you might be used to when developing for the regular web &#8211; a medium that&#8217;s already tricky and nuanced. Coding for email clients is downright dumb in comparison.</p>
<ol>
<li><strong>Plan and internally conceptualize your tables.</strong> Lots and lots of tables, obviously.  Look at the PSD handed off to you and, in your head, plan ahead of time how you&#8217;re going to tackle the layout.   Don&#8217;t try and get cute with an overabundance of col and rowspans.  It will only make things more difficult over time.   I found myself starting with a main outer table shell consisting of a few rows and cells to get the content justified.</li>
<li><strong>Table cells that consist of just an image &#8211; make sure those images are all aligned left</strong> (or right, if you are so inclined).  Some current generation browsers will leave a gap after the bottom of the image for some reason, regardless of white-space in your markup.  Sure, &lt;td&gt;&lt;img /&gt;&lt;/td&gt; might look great, but it will still jack up your already delicate table layout.  So remember, aligning the image will fix this.</li>
<li><strong>Background images.  Completely forget about them.</strong> They are dead to you.  If you want this email to look flawless in Outlook 2007, there are no such thing as background images &#8211; either via inline CSS or the background property for TD&#8217;s.   I hope you enjoy the slicing tool in Photoshop because you&#8217;re going to end up rather proficient in it by the time you&#8217;re done.   Because of this I suggest you become friendly with whoever is designing the comp you&#8217;ll be developing.  Possibly send them flowers or take them out to a nice lunch.   Otherwise the possibility is quite real that you&#8217;ll receive a comp with copy floating all over and on top of arbitrary visual elements.</li>
<li>On a similar note &#8211; <strong>familiarize yourself with what is supported in the various email clients</strong>.  Campaign Monitor has put together <a href="http://www.campaignmonitor.com/css/">a rather handy matrix of email clients versus the CSS that is and is not supported</a>.  Read through this as a primer and have it tucked away for future use &#8211; you&#8217;ll probably need it.   Also at Campaign Monitor &#8211; <a href="http://www.campaignmonitor.com/templates/">a collection of free email templates you may download</a> as reference, or possibly (if you bribe them), a basis for your designer to use as &#8220;inspiration&#8221;.</li>
<li><strong>Don&#8217;t expect an inline style at the outermost TD declaring the font information to cascade into your inner table soup.</strong> Somewhere in your code I suggest wrapping some comments around a collection of what you anticipate being a common set of inline style attributes.  This will allow quick access to copy and paste into your &lt;td&gt;&#8217;s, &lt;p&gt;&#8217;s, &lt;span&gt;&#8217;s, etc.</li>
<li><strong>And finally &#8211; Comments.</strong> Be kind with your use of comments for the express purpose of landmarking where things are in your markup.  Front-end development in 2010 is a beautiful thing and we forget how miserable it used to be 6+ years ago.  Over 25k in html alone is a hard thing to imagine these days, but when you get up to that you&#8217;ll thank yourself if you&#8217;ve placed gigantic honkin&#8217; comments telling yourself where the left and right content starts and ends.</li>
</ol>
<p>Final thoughts &#8211; You will no longer take for granted the wonder and beauty that is good, clean, lovely, semantic markup.  It absolutely boggles the mind that corporate IT managers will fall over themselves getting new versions of Office rolled out to their IT infrastructure, but OMG A POX ON NEW VERSIONS OF INTERNET EXPLORER (OH THE HORROR!).</p>
<p>Last but not least &#8211; know where the closest liquor/booze/package store is.  You&#8217;ll need a drink or two by the time this is over.</p>
<p><small>(hat tip to <a href="http://twitter.com/bmenoza">@bmenoza</a> for the nudge in getting this post up)</small></p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2010/01/15/tips-for-developing-html-emails/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Google Apps Email as Your App&#8217;s SMTP Server</title>
		<link>http://joeloliveira.com/2009/04/27/using-google-apps-email-as-your-apps-smtp-server/</link>
		<comments>http://joeloliveira.com/2009/04/27/using-google-apps-email-as-your-apps-smtp-server/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 20:57:13 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Site Work]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/2009/04/27/using-google-apps-email-as-your-apps-smtp-server/</guid>
		<description><![CDATA[Something I&#8217;ve held out on for a while now has been to switch over the settings for ActionMailer in my application(s) to point to my hosted Google apps account.   I figured it was probably time to do so as piping email notifications through my comcast email account is generally, probably, a bad idea (courtesy of [...]]]></description>
			<content:encoded><![CDATA[<p>Something I&#8217;ve held out on for a while now has been to switch over the settings for ActionMailer in my application(s) to point to my hosted Google apps account.   I figured it was probably time to do so as piping email notifications through my comcast email account is generally, probably, a bad idea (courtesy of the &#8220;No Duh&#8221; department).</p>
<p>Seems like it should be rather easy, no?  Just change action mailer to resemble:</p>
<p><code><br />
ActionMailer::Base.smtp_settings = {<br />
:address =&gt; "smtp.gmail.com",<br />
:port =&gt; 587,<br />
:domain =&gt; "hosteddomain.com",<br />
:authentication =&gt; :plain,<br />
:user_name =&gt; "account@hosteddomain.com",<br />
:password =&gt; "omgsup3rsecret"<br />
}</code></p>
<p>Meh. Looks easy enough, right?  Except for the fact Google&#8217;s got some magic TLS authentication thing going on &#8211; you&#8217;ll run into an error in your mailers resembling <em>Must issue a STARTTLS command first.</em>.  Enough to make you work a little harder to get the magic working.</p>
<p>For those of you/us that are running Ruby 1.8.7 and Rails 2.3.x the answer is rather simple &#8211; add <em>:enable_starttls_auto =&gt; true</em> to your smtp settings, which will result in :</p>
<p><code><br />
ActionMailer::Base.smtp_settings = {<br />
:enable_starttls_auto =&gt; true,<br />
:address =&gt; "smtp.gmail.com",<br />
:port =&gt; 587,<br />
:domain =&gt; "hosteddomain.com",<br />
:authentication =&gt; :plain,<br />
:user_name =&gt; "account@hosteddomain.com",<br />
:password =&gt; "omgsup3rsecret"<br />
}</code></p>
<p>And for the rest of you/us (that would be me) that are still sticking with Ruby 1.8.6, there is an answer in the form of <a href="http://github.com/openrain/action_mailer_tls/tree/master">the action_mailer_tls gem</a>.  Following the readme will get you to right where you want to be &#8211; shoveling all the mail you would like into the ether that is the interwebs.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2009/04/27/using-google-apps-email-as-your-apps-smtp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meta descriptions and keywords for each page and post in WordPress</title>
		<link>http://joeloliveira.com/2009/04/03/meta-descriptions-and-keywords-for-each-page-and-post-in-wordpress/</link>
		<comments>http://joeloliveira.com/2009/04/03/meta-descriptions-and-keywords-for-each-page-and-post-in-wordpress/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 17:09:13 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[meta tags]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/2009/04/03/meta-descriptions-and-keywords-for-each-page-and-post-in-wordpress/</guid>
		<description><![CDATA[After searching for a plugin that might accommodate this in WordPress and coming up empty, I went digging for a possible easy way to do this with the means available.   Logic dictates that with custom fields this should be rather easy to accomplish. The only snag might have been that in retreiving a custom field [...]]]></description>
			<content:encoded><![CDATA[<p>After searching for a plugin that might accommodate this in WordPress and coming up empty, I went digging for a possible easy way to do this with the means available.   Logic dictates that with custom fields this should be rather easy to accomplish.</p>
<p>The only snag might have been that in retreiving a custom field for a page or a post you need the page or post&#8217;s ID.   Usually this id is readily available within &#8220;the loop&#8221;, but what about when we&#8217;re up in the &lt;head&gt; tags?    A little searching in the codex reveals that we can grab your pages&#8217; ID with <strong>$wp_query-&gt;post-&gt;ID</strong>.  Fantastic &#8211; because, with that we&#8217;re pretty much done! Adding the following in your theme&#8217;s header.php file between &lt;head&gt; &#8230; &lt;/head&gt; :</p>
<blockquote><p>&lt;meta name=&#8221;keywords&#8221; content=&#8221;&lt;?php $key=&#8221;meta_keywords&#8221;; echo get_post_meta($wp_query-&gt;post-&gt;ID, $key, true); ?&gt;&#8221; /&gt;<br />
&lt;meta name=&#8221;description&#8221; content=&#8221;&lt;?php $key=&#8221;meta_description&#8221;; echo get_post_meta($wp_query-&gt;post-&gt;ID, $key, true); ?&gt;&#8221; /&gt;</p></blockquote>
<p>.. and &#8220;meta_keywords&#8221; and &#8220;meta_description&#8221; as custom fields with your desired content for each will get you to where you want to be.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2009/04/03/meta-descriptions-and-keywords-for-each-page-and-post-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress hosted on XO Communications.</title>
		<link>http://joeloliveira.com/2009/03/27/wordpress-hosted-on-xo-communications/</link>
		<comments>http://joeloliveira.com/2009/03/27/wordpress-hosted-on-xo-communications/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 15:49:29 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[XO]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/2009/03/27/wordpress-hosted-on-xo-communications/</guid>
		<description><![CDATA[Suffice it to say &#8211; it&#8217;s not a winning combination.   There are two definitive hacks you&#8217;ll need to get things to work. First, a plugin to disable canonical URL redirection.  Second, a hack to wp-settings.php that circumvents the XO php configuration&#8217;s not having $_SERVER['REQUEST_URI']. Update: the second hack will break the non-admin part of the [...]]]></description>
			<content:encoded><![CDATA[<p>Suffice it to say &#8211; it&#8217;s not a winning combination.   There are two definitive hacks you&#8217;ll need to get things to work.</p>
<p>First, <a href="http://wordpress.org/support/topic/233098?replies=10" target="_blank">a plugin to disable canonical URL redirection</a>.  Second, <a href="http://wordpress.org/support/topic/194305?replies=6">a hack to wp-settings.php that circumvents the XO php configuration&#8217;s not having <em>$_SERVER['REQUEST_URI']</em></a>.</p>
<p><strong>Update:</strong> the second hack will break the non-admin part of the site in the context of the current site I&#8217;ve been working on.  So your mileage may vary.</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2009/03/27/wordpress-hosted-on-xo-communications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing libmemcached and the memcached gem on Leopard</title>
		<link>http://joeloliveira.com/2009/02/16/installing-libmemcached-and-the-memcached-gem-on-leopard/</link>
		<comments>http://joeloliveira.com/2009/02/16/installing-libmemcached-and-the-memcached-gem-on-leopard/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 02:18:44 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Whining]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/2009/02/16/installing-libmemcached-and-the-memcached-gem-on-leopard/</guid>
		<description><![CDATA[What a huge pain in the ass.I just spent hours trying to get every combination of these two to work together and nothing worked.   A handful of versions of libmemcached had no problems installing &#8211; .24, .25 and .26 were all easy to install, both from source and from macports.  However, getting the memcached [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.joeloliveira.com/wp-content/uploads/2009/02/facepalm.jpg" alt="facepalm" style="float: right; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 10px" />What a huge pain in the ass.I just spent hours trying to get every combination of these two to work together and nothing worked.   A handful of versions of libmemcached had no problems installing &#8211; .24, .25 and .26 were all easy to install, both from source and from macports.  However, getting the memcached gem to install proved to be way way more difficult.I tried with a myriad of options &#8211; the most promising piece of information looked to be from <a href="http://shanesveller.com/2008/03/31/memcached-and-memcached-gem-on-leopard/#comment-18">this gentleman&#8217;s website</a> &#8211; but also proved fruitless.The final solution, after a LOT of googling and clicking around the rubygem forums &#8211; <a href="http://blog.evanweaver.com/articles/2009/01/24/secret-codes/">this post at Evan Weaver&#8217;s blog</a>.  The libmemcached-0.25.14.tar.gz and memcached-0.13.gem tarball and gem, respectively, installed easily without any problems.  After downloading all I had to run was:<br />
<blockquote>
<pre>tar -xzvf libmemcached-0.25.14.tar.gz</pre>
<pre>cd libmemcached-0.25.14</pre>
<pre>./configure &amp;&amp; make &amp;&amp; sudo make install</pre>
<pre>cd ..</pre>
<pre>sudo gem install memcached --no-rdoc --no-ri</pre>
</blockquote>
<p>Done.Finally.<strong>Update:</strong>  There seems to be a few issues with the gem I link to being installed correctly in Snow Leopard.  After spending too much time trying to figure out why the gem wouldn&#8217;t install, I installed the current memcached gem (from gemcutter) on a whim &#8211; and it compiled, and worked, without a problem instantly.   So, if you&#8217;re running Snow Leopard and looking to install the memcached gem, try out the latest version first.One caveat &#8211; I&#8217;m still using the memcached server I linked to above, version  0.25.14, still from Evan Weaver&#8217;s site</p>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2009/02/16/installing-libmemcached-and-the-memcached-gem-on-leopard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Difference between :collection and :member in Rails 2.0</title>
		<link>http://joeloliveira.com/2008/08/11/difference-between-collection-and-member-in-rails-20/</link>
		<comments>http://joeloliveira.com/2008/08/11/difference-between-collection-and-member-in-rails-20/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 01:06:57 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Site Work]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[enlightenment]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.joeloliveira.com/2008/08/11/difference-between-collection-and-member-in-rails-20/</guid>
		<description><![CDATA[In getting up to speed with the new bells and whistles in Rails 2.0s RESTful routing capabilities I ran into something that puzzled me.  Of the options for a resource defined among your routes there were two similar pieces that, for one reason or another, I could just not find a solid and bulletproof explanation [...]]]></description>
			<content:encoded><![CDATA[<p>In getting up to speed with the new bells and whistles in Rails 2.0s RESTful routing capabilities I ran into something that puzzled me.  Of the options for a resource defined among your routes there were two similar pieces that, for one reason or another, I could just not find a solid and bulletproof explanation for &#8211; <strong>:collection</strong> and <strong>:member</strong>.  The :member part of it I got pretty easily for some reason, because its description is inherent in its own name &#8230; &#8220;a member among the default restful actions&#8221;.  The :collection part?  Notsomuch.  After some digging in the Rails mailing list I ran into a great, and worthy, explanation for this knucklehead by a contributer named &#8220;deegee&#8221;:</p>
<blockquote><p>For example, with map.resources :reviews, if you want to add a method &#8216;delete_all&#8217; that deletes all reviews at once. You may want to call that with &#8216;/reviews/delete_all&#8217; and method PUT (never use GET to delete something). This method is acting on all resources (a<span class="nfakPe"> collection</span>), so the route should be:</p>
<blockquote><p><strong>map.resources :reviews, :<span class="nfakPe">collection</span> =&gt; { :delete_all =&gt; :put }</strong></p></blockquote>
<p>If you want to have a custom action acting on a specific resource, e.g. &#8216;/reviews/3/give_rating&#8217;, then your action is on a <span class="nfakPe">member</span> and the route would be</p>
<blockquote><p><strong>map.resources :reviews, :<span class="nfakPe">member</span> =&gt; { :give_rating =&gt; :put }</strong></p></blockquote>
</blockquote>
<p>So that&#8217;s it! They&#8217;re the same other than :member working on a single resource, while :collection works on multiple.  DONE!</p>
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://joeloliveira.com/2008/08/11/difference-between-collection-and-member-in-rails-20/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
