<?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>26AM Design Studio (Creative) &#187; Coding</title>
	<atom:link href="http://www.26am.com/blog/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.26am.com</link>
	<description>Web Development, Graphic Design Blog</description>
	<lastBuildDate>Fri, 29 Jan 2010 10:11:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Printer friendly web pages with &#8220;Print.css&#8221;</title>
		<link>http://www.26am.com/blog/2010/01/27/printer-friendly-web-pages-with-print-css/</link>
		<comments>http://www.26am.com/blog/2010/01/27/printer-friendly-web-pages-with-print-css/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 18:01:32 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design Thoughts]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Print]]></category>

		<guid isPermaLink="false">http://www.26am.com/?p=202</guid>
		<description><![CDATA[When most people think web pages they think &#8220;on screen.&#8221; I&#8217;ll admit, I&#8217;m the exact same way. I rarely think of taking a web page off screen and onto paper. On a recent project 26AM completed for a California State Government agency, we learned that portability not only to mobile devices but to paper is [...]]]></description>
			<content:encoded><![CDATA[<p>When most people think web pages they think &#8220;on screen.&#8221; I&#8217;ll admit, I&#8217;m the exact same way. I rarely think of taking a web page off screen and onto paper. On a recent project 26AM completed for a California State Government agency, we learned that portability not only to mobile devices but to paper is an important criteria.<span id="more-202"></span></p>
<p>It&#8217;s been a long time since I printed a web page (partially because I&#8217;m cheap and don&#8217;t like changing ink jet cartridges). However, printing a page doesn&#8217;t have to be a pain if the designer took a little extra time and made a &#8220;print.css&#8221; stylesheet. Print.css when applied correctly can make a web page easy to read and ink efficient.</p>
<p>Let&#8217;s take for instance the 26AM blog which you&#8217;re reading right now. We&#8217;ve created a print.css file that does the following:</p>
<ul>
<li>Changes the background to white</li>
<li>Uses Arial, Helvetica, Sans-Serif fonts</li>
<li>Removes all menus, the search bar, sidebar, header images</li>
<li>Adds print friendly titles and headers</li>
<li>Adds copyright information and the date/time stamp.</li>
</ul>
<p>The first step is instructing the browser to use <a href="http://www.26am.com/wp-content/themes/26AM/print.css">Print.css</a> when a person chooses to print the document. We added the following line to our HEAD tag.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.26am.com/wp-content/themes/26AM/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;</pre></div></div>

<p>Of course for your purposes, you&#8217;ll want to set the HREF to your newly created print.css file. The second step is filling in the <a href="http://www.26am.com/wp-content/themes/26AM/print.css">Print.css</a> file. Ours looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* 26AM Print Styles */</span>
<span style="color: #a1a100;">@media print {</span>
	body <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> arial<span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11pt</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#header</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	a<span style="color: #00AA00;">,</span> a<span style="color: #3333ff;">:visited</span><span style="color: #00AA00;">,</span> a<span style="color: #3333ff;">:active </span><span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#09C</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#printheader</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#29ABE2</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	<span style="color: #cc00cc;">#printfooter</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10pt</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2em</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
 	<span style="color: #6666ff;">.breadcrumb</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">9pt</span><span style="color: #00AA00;">;</span>
		<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	img<span style="color: #6666ff;">.authoravatar</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
	a.stbutton<span style="color: #00AA00;">,</span>
	h2.pagetitle<span style="color: #00AA00;">,</span>
	p.postmetadata<span style="color: #00AA00;">,</span>
	.respond<span style="color: #00AA00;">,</span>
	<span style="color: #cc00cc;">#respond</span><span style="color: #00AA00;">,</span>
	<span style="color: #cc00cc;">#sidebar</span><span style="color: #00AA00;">,</span>
	<span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>You&#8217;ll see that the majority of what we&#8217;ve done is hide things. You&#8217;ll also see that we are revealing things as well. We&#8217;ve hidden all the unnecessary information that we mentioned above, but then we revealed the printer friendly formatted information such as date and time stamp. Hope this has helped. If you&#8217;re working on a project for a client or for yourself, having a printer friendly version of the website can really show your attention to detail and care for the end user. Leave us a note and let us know if this has helped you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.26am.com/blog/2010/01/27/printer-friendly-web-pages-with-print-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon Fulfillment Web Service (FWS) using Ruby and Soap</title>
		<link>http://www.26am.com/blog/2009/11/04/amazon-fulfillment-web-service-fws-using-ruby-and-soap/</link>
		<comments>http://www.26am.com/blog/2009/11/04/amazon-fulfillment-web-service-fws-using-ruby-and-soap/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 16:15:46 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.26am.com/blog/?p=143</guid>
		<description><![CDATA[Amazon is the king of making their products accessible via web services, but unfortunately Ruby hasn&#8217;t made the list of languages they provide sample client code for.  At least not for FWS. So if you&#8217;re looking to build an e-commerce site in ruby that uses Fulfillment By Amazon to ship physical products you&#8217;ve get to [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon is the king of making their products accessible via web services, but unfortunately Ruby hasn&#8217;t made the list of languages they provide sample client code for.  At least not for FWS. So if you&#8217;re looking to build an e-commerce site in ruby that uses Fulfillment By Amazon to ship physical products you&#8217;ve get to roll your own. Amazon provides two APIs for accessing FWS: REST and SOAP.<span id="more-143"></span></p>
<p>If you&#8217;re a Ruby developer (and especially Rails) we&#8217;ve all been told REST &gt; SOAP. REST is lightweight, simple, etc. So of course we&#8217;ll use REST! So I dug in and implemented the Outbound Use Cases for creating a fulfillment order, checking the service status, and canceling an order. And for months it worked fine. Then one day something changed. I&#8217;m still not quite sure what changed, but I started getting back 400 Bad Request responses from Amazon. That was it. No details, no explanations, no clue as to what went wrong, just 400 Bad Request. So after wasting way too much time trying to figure out what wasn&#8217;t working (with very little help from Aamzon), I decided it was time to throw in the towel and switch to SOAP. SOAP is by nature more verbose. So I figured that even if the problem was on my end, with SOAP I&#8217;d get back more useful error messages in the responses. I was right.</p>
<p>So you&#8217;re going to do SOAP in ruby, the natural, default option is soap4r. I&#8217;ve used soap4r before, and in the past it had done exactly what I needed. Unfortunately, the simplicity of soap4r caused me nothing but pain when trying to work with the FWS SOAP API. Amazon wants (needs) an &lt;evn:Header&gt; in your soap envelope containing 3 pieces of information: Access Key, Timestamp, and Signature. I know that soap4r supports adding extra headers, but it&#8217;s really clumsy. So after an hour or so of getting it wrong with soap4r, I decided it was time to look for an alternative.</p>
<p>Enter <a title="HandSoap" href="http://github.com/unwire/handsoap" target="_blank">handsoap</a>! Handsoap does less for you, *a lot less*, but that also means it&#8217;s way more flexible. Flexibility is what I needed. In less than 2 hours from finding handsoap, I had a working SOAP client for the call I cared the most about (creating an order), with nice tests to go with it! Enough babbling, time for some code samples:</p>
<p>I&#8217;ll be repeating some of what is in the handsoap getting started guide, but you&#8217;ll appreciate having it all in one place. (Do yourself a favor and still read through the <a href="http://wiki.github.com/unwire/handsoap/recommendations">handsoap getting started guide</a>).</p>
<p>First create config/initializers/amazon_fulfillment_service.rb with the service endpoint:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># wsdl: https://fba-outbound.amazonaws.com/doc/2007-08-02/AmazonFBAOutbound.wsdl</span>
AMAZON_FBA_OUTBOUND_SERVICE_ENDPOINT = <span style="color:#006600; font-weight:bold;">&#123;</span>
  <span style="color:#ff3333; font-weight:bold;">:uri</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">'https://fba-outbound.amazonaws.com'</span>,
  <span style="color:#ff3333; font-weight:bold;">:version</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#006666;">1</span>
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>Next, run the generator to create the stubs:<br />
<code><br />
./script/generate handsoap https://fba-outbound.amazonaws.com/doc/2007-08-02/AmazonFBAOutbound.wsdl<br />
</code></p>
<p>Open the file created (probably app/models/amazon_fba_outbound_service.rb)</p>
<p>You&#8217;ll want to add your AWSAccessKeyId to the header for all calls:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> on_create_document<span style="color:#006600; font-weight:bold;">&#40;</span>doc<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#008000; font-style:italic;"># register namespaces for the request</span>
  doc.<span style="color:#9966CC; font-weight:bold;">alias</span> <span style="color:#996600;">'aws'</span>, <span style="color:#996600;">'http://fba-outbound.amazonaws.com/doc/2007-08-02/'</span>
  header = doc.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;Header&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  header.<span style="color:#9900CC;">add</span> <span style="color:#996600;">&quot;aws:AWSAccessKeyId&quot;</span>, FWS_CONFIG<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:access_key_id</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>s<span style="color:#006600; font-weight:bold;">|</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;env:mustUnderstand&quot;</span>, <span style="color:#996600;">&quot;0&quot;</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;env:actor&quot;</span>, <span style="color:#996600;">&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;xmlns:aws&quot;</span>, <span style="color:#996600;">&quot;http://security.amazonaws.com/doc/2007-01-01/&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Next let&#8217;s look at the simplest of calls: <span class="code">get_service_status</span></p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> get_service_status
  response = invoke<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'aws:GetServiceStatus'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>message<span style="color:#006600; font-weight:bold;">|</span>
    build_headers<span style="color:#006600; font-weight:bold;">&#40;</span>message.<span style="color:#9900CC;">document</span>, <span style="color:#996600;">'GetServiceStatus'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  response.<span style="color:#9900CC;">http_response</span>.<span style="color:#9900CC;">status</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Returning <span class="code">response.http_response.status</span> makes the method easy to test (just look for 200). The interesting part of that call is the <span class="code">build_headers</span> method. We need to add the Timestamp and Signature to the Header on a per-call basis. Here&#8217;s that method:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> build_headers<span style="color:#006600; font-weight:bold;">&#40;</span>doc, action, timestamp = <span style="color:#0000FF; font-weight:bold;">nil</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#0066ff; font-weight:bold;">@timestamp</span> <span style="color:#006600; font-weight:bold;">||</span>= <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span>.<span style="color:#9900CC;">utc</span>.<span style="color:#9900CC;">strftime</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;%Y-%m-%dT%H:%M:%S&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">'.000Z'</span>
  <span style="color:#0066ff; font-weight:bold;">@signature</span> = FwsHelper.<span style="color:#9900CC;">aws_encoded</span><span style="color:#006600; font-weight:bold;">&#40;</span>action <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@timestamp</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  header = doc.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;Header&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#008000; font-style:italic;"># Add signature</span>
  header.<span style="color:#9900CC;">add</span> <span style="color:#996600;">&quot;aws:Signature&quot;</span>, <span style="color:#0066ff; font-weight:bold;">@signature</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>s<span style="color:#006600; font-weight:bold;">|</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;env:mustUnderstand&quot;</span>, <span style="color:#996600;">&quot;0&quot;</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;env:actor&quot;</span>, <span style="color:#996600;">&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;xmlns:aws&quot;</span>, <span style="color:#996600;">&quot;http://security.amazonaws.com/doc/2007-01-01/&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#008000; font-style:italic;"># Add timestamp</span>
  header.<span style="color:#9900CC;">add</span> <span style="color:#996600;">&quot;aws:Timestamp&quot;</span>, <span style="color:#0066ff; font-weight:bold;">@timestamp</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>s<span style="color:#006600; font-weight:bold;">|</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;env:mustUnderstand&quot;</span>, <span style="color:#996600;">&quot;0&quot;</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;env:actor&quot;</span>, <span style="color:#996600;">&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;</span>
    s.<span style="color:#9900CC;">set_attr</span> <span style="color:#996600;">&quot;xmlns:aws&quot;</span>, <span style="color:#996600;">&quot;http://security.amazonaws.com/doc/2007-01-01/&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>The signature is built by concatenating the action + timestamp, then creating an HMAC-SHA1 digest of it. Here&#8217;s my</p>
<pre>FwsHelper.aws_encoded</pre>
<p>method:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'base64'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'digest/sha1'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> FwsHelper
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">aws_encoded</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">string</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    digest   = <span style="color:#6666ff; font-weight:bold;">OpenSSL::Digest::Digest</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'sha1'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    b64_hmac = <span style="color:#CC00FF; font-weight:bold;">Base64</span>.<span style="color:#9900CC;">encode64</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">OpenSSL::HMAC</span>.<span style="color:#9900CC;">digest</span><span style="color:#006600; font-weight:bold;">&#40;</span>digest, FWS_CONFIG<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:secret_access_key</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#CC0066; font-weight:bold;">string</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">strip</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>That should be enough code to get you moving. If I missed something, or you&#8217;d like more elaboration on something, tell us about it in the comments and I&#8217;ll update the post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.26am.com/blog/2009/11/04/amazon-fulfillment-web-service-fws-using-ruby-and-soap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Google Base &#8211; Expected response code 200, got 400&#8243; &#8211; Resolved!</title>
		<link>http://www.26am.com/blog/2009/10/21/google-base-and-error-google-base-expected-response-code-200-got-400-resolved/</link>
		<comments>http://www.26am.com/blog/2009/10/21/google-base-and-error-google-base-expected-response-code-200-got-400-resolved/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 00:12:50 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.26am.com/blog/?p=74</guid>
		<description><![CDATA[So we&#8217;re working on a Google Base setup for Magento for one of our clients and ran into some errors. Mind you Google Base integration is native to Magento. However there are some things you must know. There are required fields that need to be mapped. If you&#8217;ve never setup Google Base with Magento, I [...]]]></description>
			<content:encoded><![CDATA[<p>So we&#8217;re working on a Google Base setup for Magento for one of our clients and ran into some errors. Mind you Google Base integration is native to Magento. However there are some things you must know. There are required fields that need to be mapped. <span id="more-74"></span>If you&#8217;ve never setup Google Base with Magento, I recommend you start here: <a href="http://vimeo.com/2368176">http://vimeo.com/2368176</a></p>
<p>With that you&#8217;ll need to also create a new attribute for your products. Do this by going to:</p>
<ol>
<li>Catalog -&gt; Attributes -&gt; Manage Attributes</li>
<li>Add New Attribute</li>
<li>Set your attribute code to: &#8220;condition&#8221;</li>
<li>Set the &#8220;Catalog Input Type for Store Owner&#8221; to &#8220;Dropdown&#8221;</li>
<li>Next, set &#8220;Values Required&#8221; to &#8220;Yes&#8221;</li>
<li>Leave the rest, as is on this page</li>
<li>Go to the Manage Label/Options page</li>
<li>Label your titles as &#8220;Condition&#8221;</li>
<li>Choose &#8220;Add Options&#8221;</li>
<li>Place the value of &#8220;New&#8221; in all fields and select &#8220;Is Default&#8221;</li>
<li>Save Attribute and return to editing your products. Be sure to set all products to the condition of &#8220;New&#8221;</li>
</ol>
<p>This is a key step in getting Magento to work with Google Base. If you don&#8217;t map the condition, you will come across the error &#8220;Google Base &#8211; Expected response code 200, got 400&#8243;</p>
<p>Drop me a line if this helps! This was tested on Magento ver. 1.3.2.3.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.26am.com/blog/2009/10/21/google-base-and-error-google-base-expected-response-code-200-got-400-resolved/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web 2.0 is old skool</title>
		<link>http://www.26am.com/blog/2009/03/04/web-20-is-old-skool/</link>
		<comments>http://www.26am.com/blog/2009/03/04/web-20-is-old-skool/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 21:26:02 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design Thoughts]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.26am.com/blog/?p=46</guid>
		<description><![CDATA[Remember when &#8220;Web 2.0&#8243; was as talked about as the weather? Everyone wanted their site to look Web 2.0. There were blog posts galore about companies becoming Web 2.0. When it comes down to it, Web 2.0 is really a couple of things: being social, using ajax, and efficient design. One of the things that [...]]]></description>
			<content:encoded><![CDATA[<p>Remember when &#8220;Web 2.0&#8243; was as talked about as the weather? Everyone wanted their site to look Web 2.0. There were blog posts galore about companies becoming Web 2.0. When it comes down to it, Web 2.0 is really a couple of things: being social, using ajax, and efficient design. One of the things that drove me crazy during all the buzz was that everyone felt the need to make their site Web 2.0. That to me is &#8220;fad mentality.&#8221; It hasn&#8217;t really seemed to serve anyone in the past nor do I think it&#8217;ll serve anyone now. Web 2.0ishness doesn&#8217;t apply to everyone. Having a blog doesn&#8217;t apply to someone looking to put their plumbing business online. That kind of site needs basic Search Engine Optimization and the facts about their services.</p>
<p>So if you&#8217;re thinking about Web 2.0ing (not a real word) your company/site/brand, ask yourself a few questions:</p>
<ul>
<li>Will my company benefit from interacting with customers/members/clients through the web?</li>
<li>Are my clients actually people who use the web to interact? (Most construction companies don&#8217;t use the web to conduct business)</li>
<li>Are there better ways for me to drum up business/awareness for our company?</li>
</ul>
<p>I&#8217;m not against Web 2.0, heck 26AM has jumped on the concept. I am however against trying to make something hip and trendy when it serves no purpose and in fact could potentially hurt a business.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.26am.com/blog/2009/03/04/web-20-is-old-skool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why we use Git and how to set up your own Git Server</title>
		<link>http://www.26am.com/blog/2009/02/23/why-we-use-git-and-how-to-set-up-your-own-git-server/</link>
		<comments>http://www.26am.com/blog/2009/02/23/why-we-use-git-and-how-to-set-up-your-own-git-server/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 22:12:32 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[git github gitosis]]></category>

		<guid isPermaLink="false">http://www.26am.com/blog/?p=38</guid>
		<description><![CDATA[I just spent the weekend moving all our svn repos to git. Yes. All of them. There have been plenty of great articles written about why git rocks, but for us it comes down to branches. The ability to painlessly create a branch for a new feature and then merge it easily later is crucial [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent the weekend moving all our svn repos to <a title="Git" href="http://git-scm.com/" target="_blank">git</a>. Yes. All of them. There have been plenty of great articles written about why git rocks, but for us it comes down to branches. The ability to <strong><em>painlessly </em></strong>create a branch for a new feature and then merge it easily later is crucial work doing new development on large production systems.</p>
<p>We started off by moving a couple of our open source projects over to github.com. I&#8217;ve gotta say, Github is really impressive. Great UI, generous free git hosting, nice pretty graphs&#8230; So if we love github so much, why is this an article about setting up your own git server? Because we&#8217;re a small company, with lots of projects in our portfolio. The repo to cost ratio on github made it impractical for us to move all our svn repos (which we hosted on our own server) over to github.</p>
<p>I had tried previously to set up my own git server (before finding github), and had gotten bogged down, and after a few hours of poking around the internet decided it wasn&#8217;t worth the effort. Then recently a friend of mine showed me me <a title="Gitosis" href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way" target="_blank">gitosis</a>. Gitosis makes setting up your own git server trivial. Literally 15 minutes later I was up and running with my first git repo on my server. I won&#8217;t go into all the details on how to set up gitosos because you can read about it on <a title="Garry Dolley's blog" href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way" target="_blank">Garry Dolley&#8217;s blog</a>. It took a few more hours to migrate over all our svn repos, but we&#8217;re now swimming in the joy that is 100% git usage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.26am.com/blog/2009/02/23/why-we-use-git-and-how-to-set-up-your-own-git-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>haml: a better way to look at rails and css</title>
		<link>http://www.26am.com/blog/2009/02/16/haml-a-better-way-to-look-at-rails-and-css/</link>
		<comments>http://www.26am.com/blog/2009/02/16/haml-a-better-way-to-look-at-rails-and-css/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 02:46:02 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HAML]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[SASS]]></category>

		<guid isPermaLink="false">http://www.26am.com/blog/?p=25</guid>
		<description><![CDATA[We&#8217;re always looking for ways to produce cleaner, smaller and faster code. Haml is a rails plugin that brings a couple of things with it. The first being HAML and the second, SASS. Both are ways of condensing and streamlining coding for Ruby on Rails and CSS. You&#8217;ll find plenty of people who don&#8217;t like [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re always looking for ways to produce cleaner, smaller and faster code. <a href="http://haml.hamptoncatlin.com/">Haml</a> is a rails plugin that brings a couple of things with it. The first being <a href="http://haml.hamptoncatlin.com/">HAML </a>and the second, SASS. Both are ways of condensing and streamlining coding for <a href="http://rubyonrails.org/">Ruby on Rails</a> and CSS. You&#8217;ll find plenty of people who don&#8217;t like <a href="http://haml.hamptoncatlin.com/">HAML</a>.</p>
<p>Being a development/design shop, quality control is very important to us. Anything that cuts down the amount of typing and syntaxing is going to benefit our clients and us. The less typing we (26AM, twentysixam) has to do, the less room for error. This also means faster troubleshooting and updates for our clients. SASS creates the possibility for variables within CSS. Why update a color attribution in 10 places when you could update it in one. Why type a definition 4 times when you could do it once?</p>
<p>The beauty behind HAML is that it is an indent based coding style. An indent means a new definition. It&#8217;s that simple. It&#8217;s been a couple weeks and we&#8217;re fans. Some people may think we&#8217;re lazy, on the contrary, we&#8217;re fast. We want to put out projects faster and more accurately. Because of this fact, we&#8217;ve started using HAML.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.26am.com/blog/2009/02/16/haml-a-better-way-to-look-at-rails-and-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
