<?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>metaduck &#187; No category</title>
	<atom:link href="http://www.metaduck.com/category/no-category/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.metaduck.com</link>
	<description></description>
	<lastBuildDate>Wed, 05 May 2010 12:04:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New year resolutions</title>
		<link>http://www.metaduck.com/2009/12/new-year-resolutions/</link>
		<comments>http://www.metaduck.com/2009/12/new-year-resolutions/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 16:35:03 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[No category]]></category>

		<guid isPermaLink="false">http://www.metaduck.com/?p=234</guid>
		<description><![CDATA[Happy new year to everyone!
I haven't posted for a while - had a busy end-of-year...
Things I want to look into early 2010:

Haml
Rails 3
Node.js
Erlang
Hadoop
Scala
EJB 3
Ruby alteranative VMs (JRuby, MacRuby, LevMag)
...and more cool blog posts!

]]></description>
			<content:encoded><![CDATA[<p>Happy new year to everyone!</p>
<p>I haven't posted for a while - had a busy end-of-year...</p>
<p>Things I want to look into early 2010:</p>
<ul>
<li>Haml</li>
<li>Rails 3</li>
<li>Node.js</li>
<li>Erlang</li>
<li>Hadoop</li>
<li>Scala</li>
<li>EJB 3</li>
<li>Ruby alteranative VMs (JRuby, MacRuby, LevMag)</li>
<li>...and more cool blog posts!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/12/new-year-resolutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sweepy &#8211; Distributed and scalable file caching expiration in Rails</title>
		<link>http://www.metaduck.com/2009/10/sweepy-distributed-and-scalable-file-caching-expiration-in-rails/</link>
		<comments>http://www.metaduck.com/2009/10/sweepy-distributed-and-scalable-file-caching-expiration-in-rails/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 23:13:00 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[No category]]></category>

		<guid isPermaLink="false">http://www.metaduck.com/?p=196</guid>
		<description><![CDATA[Followin up on my post about Rails cache on a distributed environment, I recently published a Rails plugin called sweepy.
Sweepy allows you to expire file-based cache (page cache and fragment cache) on Rails on multiple boxes.
If you don’t want or don’t need to setup memcached, and just want to simply use Rails page and / [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-224" title="sweepy" src="http://www.metaduck.com/wp-content/uploads/2009/10/sweepy.jpeg" alt="sweepy" width="116" height="142" />Followin up on my post about Rails <a href="http://www.metaduck.com/2009/10/rails-cache-in-distributed-environment/">cache on a distributed environment</a>, I recently published a Rails plugin called <em>sweepy</em>.</p>
<p>Sweepy allows you to expire file-based cache (page cache and fragment cache) on Rails on multiple boxes.</p>
<p>If you don’t want or don’t need to setup memcached, and just want to simply use Rails page and / or fragment caching, sweepy automatically handles page expiration.</p>
<p>You can use the Rails expire_page and expire_cache <span>API</span>, no need to change existing code.</p>
<p><span id="more-196"></span>…with the bonus of sweepy supporting a regexp as a expire_page argument.</p>
<h2>Really, what is <em>sweepy</em>?</h2>
<p><em>sweepy</em> is two things:</p>
<ol>
<li>A daemon running on each box</li>
<li>A Rails plugin to expire cache</li>
</ol>
<h2><em>sweepy</em> is scalable</h2>
<p><em>sweepy</em> uses <span>UDP</span> broadcasts for cache cleaning. This way you can add as many machines as you want, and cache expiration times will remain the same.</p>
<p>Check out <a href="http://github.com/pgte/sweepy">sweepy at github</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/10/sweepy-distributed-and-scalable-file-caching-expiration-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to alias_method_chain a class method on Rails</title>
		<link>http://www.metaduck.com/2009/10/how-to-alias_method_chain-a-class-method-on-rails/</link>
		<comments>http://www.metaduck.com/2009/10/how-to-alias_method_chain-a-class-method-on-rails/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 11:53:04 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[No category]]></category>

		<guid isPermaLink="false">http://www.metaduck.com/?p=182</guid>
		<description><![CDATA[Sometimes, when building a plugin, you have to extend Rails behaviour using alias_method_chain.
So you do, on the included module:

...
    def self.included(base)
      base.send :include  InstanceMethods
      base.class_eval do
        alias_method_chain :method_i_want_to_extend, :my_feature
      [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, when building a plugin, you have to extend Rails behaviour using <a href="http://weblog.rubyonrails.org/2006/4/26/new-in-rails-module-alias_method_chain">alias_method_chain</a>.</p>
<p>So you do, on the included module:</p>
<pre class="brush: ruby;">
...
    def self.included(base)
      base.send :include  InstanceMethods
      base.class_eval do
        alias_method_chain :method_i_want_to_extend, :my_feature
      end
    end

    module InstanceMethods
     def method_i_want_to_extend_with_my_feature(args)
       (do something or not...)
       method_i_want_to_extend_without_my_feature(args)
       (do something or not...)
     end
    end
...
</pre>
<p>What if the method you are extending is a class method?</p>
<p><span id="more-182"></span>Simple, just use the singleton class:</p>
<pre class="brush: ruby;">
...
    def self.included(base)
      base.extend ClassMethods
      base.class_eval do
        class &lt;&lt; self
          alias_method_chain :method_i_want_to_extend, :my_feature
        end
      end
    end

    module ClassMethods
     def method_i_want_to_extend_with_my_feature(args)
       (do something or not...)
       method_i_want_to_extend_without_my_feature(args)
       (do something or not...)
     end
    end
...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/10/how-to-alias_method_chain-a-class-method-on-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tutorial &#8211; advanced styled_objects on Rails</title>
		<link>http://www.metaduck.com/2009/10/tutorial-advanced-styled-objects-on-rails/</link>
		<comments>http://www.metaduck.com/2009/10/tutorial-advanced-styled-objects-on-rails/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 11:19:04 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[No category]]></category>

		<guid isPermaLink="false">http://www.metaduck.com/?p=158</guid>
		<description><![CDATA[Following the building and styling a Rails app with styled_objects tutorial, we will learn how to use some advanced features of styled_objects and also some best practices to keep your CSS code maintainable while using styled_objects.
Use CSS variables
On styled_objects you can define global variables to be used throughout your CSS.
Declare variables on one place: app/views/globals.css
Example [...]]]></description>
			<content:encoded><![CDATA[<p>Following the <em><a href="http://www.metaduck.com/2009/10/tutorial-building-and-styling-a-rails-app-with-styled-objects/">building and styling a Rails app with styled_objects tutorial</a></em>, we will learn how to use some advanced features of styled_objects and also some best practices to keep your CSS code maintainable while using styled_objects.</p>
<h2><span id="more-158"></span>Use CSS variables</h2>
<p>On styled_objects you can define global variables to be used throughout your CSS.</p>
<p>Declare variables on one place: app/views/globals.css</p>
<p>Example of a piece of <em>global.css</em> that defines three variables:</p>
<pre class="brush: css;">@brand_color: #4D926F;
@base_color: #111;
@border-thickness: 1px;
</pre>
<p>Now, on any template or partial CSS file you can use these variables like this:</p>
<pre class="brush: css;">color: @brand_color;
border: @border-thickness solid @base_color;
</pre>
<p>styled_objects uses <a href="http://lesscss.org/">LESS</a> on the background, so you can use <a href="http://lesscss.org/docs.html">LESS syntax</a>, which is very similar to CSS. Be careful to only define global variables on a global file like application.css, so you can be sure the variable is present on all the included CSSs.</p>
<h2>Code generic classes</h2>
<p>OO-CSS says we should separate container styling from content styling. How can we do it using styled_objects?</p>
<p>Let's say you have a container for a box block that can be used throughout many partials. How to reuse this container?</p>
<p>What you need is a layout partial.</p>
<p>Create a app/views/containers/_box.html.erb with the container markup:</p>
<pre class="brush: php;">&lt;%= yield %&gt;</pre>
<p>And create the respective CSS under app/views/containers/_box.css:</p>
<pre class="brush: css;">border: 2px solid #333;</pre>
<p>That's it! No need for additional markup, (although you may need to if you have to decorate the box partial with images, for instance).</p>
<p>Now you only have to call your partials with a box layout like this:</p>
<pre class="brush: php;">
&lt;%= include :partial =&gt; 'article_summary', :layout =&gt; 'containers/box' %&gt;
&lt;%= include :partial =&gt; 'top_headlines', :layout =&gt; 'containers/box' %&gt;
</pre>
<h2>Debug your stylesheets</h2>
<p>Introducing variables can lead to syntax errors that, because the final stylesheet is generated on the server, cannot be debug on a browser.</p>
<p>How to debug the result?</p>
<p>In development mode, when a change you made broke your stylesheet generation, you can:</p>
<p>Open the generated page source on your browser and look for something like <em>&lt;style src="&lt;link href="/styledobjects/...</em></p>
<p>Copy this URL into the browser (by prefixing it with "http://localhost:3000" or the port your are developing on) and:</p>
<p>1. Check the <em>log/development.log</em> for syntax errors</p>
<p>2. Check the screen for errors. You will probably get a LESS error, indicating which sentence went wrong</p>
<p>Most errors are unknown declared variables, and LESS will tell you something like:</p>
<h1>Less::VariableNameError</h1>
<pre>@myvarname
</pre>
<p>This will tell that you are using a variable named <em>myvarname</em> thatis not declared.</p>
<h2>More resources</h2>
<ul>
<li><a href="http://lesscss.org/docs.html">More on LESS syntax</a></li>
<li><a href="http://www.stubbornella.org/content/2009/03/23/object-oriented-css-video-on-ydn/">Stubbornella's presentation about OO-CSS</a> (video)</li>
<li><a href="http://net.tutsplus.com/tutorials/html-css-techniques/object-oriented-css-what-how-and-why/">OO-CSS Tutorial @ Nettuts</a></li>
</ul>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 133px; width: 1px; height: 1px;">
<pre class="less_example">#4D926F;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/10/tutorial-advanced-styled-objects-on-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Structural SEO</title>
		<link>http://www.metaduck.com/2009/09/structural-seo/</link>
		<comments>http://www.metaduck.com/2009/09/structural-seo/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 21:47:13 +0000</pubDate>
		<dc:creator>Pedro Teixeira</dc:creator>
				<category><![CDATA[No category]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://localhost/metaduck/?p=24</guid>
		<description><![CDATA[SEO, SEO, it's all so 2005... but yet, if you check the average website, the SEO concerns lack on the implementation side.
Everyone in the Marketing department is concerned about metadata, keyword density, and all the other recommended metrics to quantify you content SEO, but, for the most part, their website implementation lacks at least one [...]]]></description>
			<content:encoded><![CDATA[<p>SEO, SEO, it's all so 2005... but yet, if you check the average website, the SEO concerns lack on the implementation side.</p>
<p>Everyone in the Marketing department is concerned about metadata, keyword density, and all the other recommended metrics to quantify you content SEO, but, for the most part, their website implementation lacks at least one part of something that I call <em>Structural SEO</em>.</p>
<h3><span id="more-24"></span>What is structural SEO?</h3>
<p>Structural SEO is the SEO that one can provide on the software side. It sets the base for the content writer, maximizing search engine indexability.</p>
<p>Minimal key features of structural SEO are:</p>
<h4>Page titles</h4>
<p>Page titles should vary according to content since it is a very good place to have important keywords.</p>
<p>In my opinion, they should also include the website name and navigation context, but not too much of it, and the content title should always come in first.</p>
<p>Example of a title:</p>
<p><code>Structural SEO &lt; SEO &lt; metaduck</code></p>
<h4>Headings and styling</h4>
<p>Content should be organized in headings. For that, content management people should have CSS stylesheets in place so that no additional formatting is required when entering content. Too much formatting using markup hurts SEO. Content should be only content.</p>
<p>As an example, when producing content templates or layouts, I always put the website title inside a &lt;h1&gt; tag.</p>
<p>Content title is next, which shold have it's own h2 title, and content subtitles should be inside h3, etc.</p>
<h4>Accessibility on navigation</h4>
<p>Navigation menus should not be javascript or flash dependent. This sounds simple, but there are still a lot of old and new websites out there implementing dynamic menus that are unreadable by the search engines.</p>
<p>Javascript is ok, but you should have the browser fallback on plain HTML. Your menu should work when the browser has javascript disabled.</p>
<h4>Proeminence on navigation</h4>
<p>Important navigation links should be placed as early as possible on content so that they are more relevant to the search engines.</p>
<h4>Image titles and alts</h4>
<p>All static images should have relevant alt and title attributes, and the content management tools should facilitate (and impose) filling these in.</p>
<h4>Search-engine-friendly URLs</h4>
<p>URLs should be minimal, but provide enough information on the content. For me, wordpress-style URLs are the way to go.</p>
<p>Example for the URL of a page with the title "Structural SEO":</p>
<p><code>http://mydomain.com/structural-seo</code></p>
<p>That's it. No file extensions, no unnecessary arguments, no query string. Words are well separated.</p>
<p>Several products / frameworks allow this, and several make it very hard to implement, specially when using Microsoft ones.</p>
<p>My choice ones are Wordpress (for small websites) and Ruby on Rails routing configuration (for larger websites and applications).</p>
<h3>Conclusion</h3>
<p>If you are running a website development project, please have these considerations in mind before the building phase starts.</p>
<p>If possible, before contracting anyone for building a website, ask what he can do technically to maximize SEO. These should be their minimal concerns.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metaduck.com/2009/09/structural-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
