<?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>Blog &#124; The Working Group &#187; Tech</title>
	<atom:link href="http://blog.twg.ca/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.twg.ca</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 01:09:02 +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>JSONimal &#8211; Elegant DOM construction with jQuery</title>
		<link>http://blog.twg.ca/2010/07/jsonimal-elegant-dom-construction-with-jquery/</link>
		<comments>http://blog.twg.ca/2010/07/jsonimal-elegant-dom-construction-with-jquery/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 16:04:34 +0000</pubDate>
		<dc:creator>jamie</dc:creator>
				<category><![CDATA[Friday]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=648</guid>
		<description><![CDATA[As part of my co-op term here at TWG, I&#8217;ve had the opportunity to try out new technology, approach interesting technical problems, and develop useful bits of code outside of client work. JSONimal was created on one of my &#8216;lab days&#8217; focused on innovation and experimentation. The purpose of JSONimal is to take the pain [...]]]></description>
			<content:encoded><![CDATA[<p>As part of my co-op term here at TWG, I&#8217;ve had the opportunity to try out new technology, approach interesting technical problems, and develop useful bits of code outside of client work.  JSONimal was created on one of my &#8216;lab days&#8217; focused on innovation and experimentation.</p>
<p>The purpose of JSONimal is to take the pain out of constructing HTML using Javascript.</p>
<p>What&#8217;s it do? This example should demonstrate my goal fairly well.</p>
<pre class='prettyprint'>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$(function() {<br />
&nbsp; &nbsp; $.mktag(&quot;#demo&quot;).jsonimal([<br />
&nbsp; &nbsp; &nbsp; &nbsp; [&quot;h1&quot;, {text: &quot;JSONimal!&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; [&quot;table&quot;,{style: 'border: 1px solid black'},[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;thead&quot;,[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;tr&quot;,{style: 'text-transform: uppercase'},[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;th&quot;, {text: &quot;one&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;th&quot;, {text: &quot;two&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;th&quot;, {text: &quot;three&quot;}]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;tbody&quot;, [<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;tr&quot;,[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {html: &quot;&lt;u&gt;a&lt;/u&gt;&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {text: &quot;b&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {text: &quot;c&quot;}]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;tr&quot;,[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;,[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;a&quot;, {href: &quot;http://www.google.ca&quot;, text: &quot;Google&quot;}]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {text: &quot;b&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {text: &quot;c&quot;}]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;tr&quot;,[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {text: &quot;a&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {text: &quot;b&quot;}],<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&quot;td&quot;, {text: &quot;c&quot;}]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]]<br />
&nbsp; &nbsp; &nbsp; &nbsp; ]]<br />
&nbsp; &nbsp; ]).appendTo(&quot;body&quot;);<br />
});</div></td></tr></tbody></table></div>
</pre>
<p>Which will add this to the body:</p>
<h1>JSONimal!</h1>
<table style="border: 1px solid black;">
<thead>
<tr style="text-transform: uppercase;">
<th>one</th>
<th>two</th>
<th>three</th>
</tr>
</thead>
<tbody>
<tr>
<td><u>a</u></td>
<td>b</td>
<td>c</td>
</tr>
<tr>
<td><a href="http://www.google.ca" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.google.ca');">Google</a></td>
<td>b</td>
<td>c</td>
</tr>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
</tbody>
</table>
<p>For more information and examples, check out the github page: <a href="http://github.com/phleet/JSONimal" onclick="javascript:pageTracker._trackPageview('/outbound/article/github.com');">JSONimal @ github</a>.</p>
<p>I also posted it as on the jQuery plugins page &#8211; but that just points to the github page anyway. <a href="http://plugins.jquery.com/project/jsonimal" onclick="javascript:pageTracker._trackPageview('/outbound/article/plugins.jquery.com');">JSONimal @ plugins.jquery.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2010/07/jsonimal-elegant-dom-construction-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Web Developer Quiz</title>
		<link>http://blog.twg.ca/2010/07/rails-web-developer-quiz/</link>
		<comments>http://blog.twg.ca/2010/07/rails-web-developer-quiz/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 20:43:53 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Friday]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=631</guid>
		<description><![CDATA[A web developer quiz, with special focus on Ruby on Rails]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quiz we ran last year, at Employment.nil, Toronto first Ruby job fair.</p>
<p>See if you can get them all, I&#8217;ll post the answers in a couple weeks, and if you have your own favorite trick questions, post them here.</p>
<h3><strong>Javascript</strong></h3>
<p>1. An external JavaScript must contain the &lt;script&gt; tag, true or false?</p>
<p>2. What is the purpose of the the SWFObject javascript library?<br />
<strong> </strong></p>
<h3><strong>Ruby</strong></h3>
<p>3. Given:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">a = <span style="color:#996600;">'foo'</span><br />
b = <span style="color:#0000FF; font-weight:bold;">nil</span><br />
<br />
first = a <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> b<br />
second = a <span style="color:#9966CC; font-weight:bold;">and</span> b</div></td></tr></tbody></table></div>
<p>Are <code class="codecolorer text default"><span class="text">first</span></code> and <code class="codecolorer text default"><span class="text">second</span></code> equal?</p>
<p>4. True or false?</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">2</span> == <span style="color:#006666;">0.5</span></div></td></tr></tbody></table></div>
<p>5. If <code class="codecolorer ruby default"><span class="ruby"><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'1'</span>..<span style="color:#996600;">'10'</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">to_a</span></span></code> returns:</p>
<p><code class="codecolorer ruby default"><span class="ruby"><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;1&quot;</span>, <span style="color:#996600;">&quot;2&quot;</span>, <span style="color:#996600;">&quot;3&quot;</span>, <span style="color:#996600;">&quot;4&quot;</span>, ..... <span style="color:#996600;">&quot;10&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span></span></code></p>
<p>What does <code class="codecolorer ruby default"><span class="ruby"><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'2'</span>..<span style="color:#996600;">'10'</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">to_a</span></span></code> return?</p>
<h3>Rails</h3>
<p>6. Given the following class:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> Monkey <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span><br />
has_many <span style="color:#ff3333; font-weight:bold;">:bananas</span>, <span style="color:#ff3333; font-weight:bold;">:order</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'size ASC'</span><br />
<br />
named_scope <span style="color:#ff3333; font-weight:bold;">:starting_from_massive</span>, <span style="color:#ff3333; font-weight:bold;">:order</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'size DESC'</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>What SQL is generated for the following queries:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#0066ff; font-weight:bold;">@monkey</span>.<span style="color:#9900CC;">bananas</span><br />
<span style="color:#0066ff; font-weight:bold;">@monkey</span>.<span style="color:#9900CC;">bananas</span>.<span style="color:#9900CC;">starting_from_massive</span><br />
<span style="color:#0066ff; font-weight:bold;">@monkey</span>.<span style="color:#9900CC;">bananas</span>.<span style="color:#9900CC;">all</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:order</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">nil</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></td></tr></tbody></table></div>
<h3><strong>XHTML:</strong></h3>
<p>7. The DOCTYPE declaration has no closing tag, true or false?</p>
<p>8. All XHTML tags and attributes must be in lower case, true or false?</p>
<p>9. There is a way of describing XML data, how?</p>
<p>10. What does DTD stand for?</p>
<h3><strong>AJAX:</strong></h3>
<p>11. AJAX functionality is achieved by using what object?</p>
<h3><strong>CSS:</strong></h3>
<p>12. Should you clear floats?</p>
<p>13. How do you properly clear floats?</p>
<p>14. How do you write IE specific css?<br />
Bonus: what is the problem with this?</p>
<h3><strong>Everything &#8211; Multiple Choice</strong></h3>
<p>15. Rails: Which of the following is not a form helper method?</p>
<p>a. <code class="codecolorer text default"><span class="text">text_field_tag</span></code><br />
b. <code class="codecolorer text default"><span class="text">text_input_tag</span></code><br />
c. <code class="codecolorer text default"><span class="text">text_area_tag</span></code><br />
d. <code class="codecolorer text default"><span class="text">hidden_field_tag</span></code></p>
<p>16. What&#8217;s the default REST HTTP action verb for updating an existing record?</p>
<p>a. PUT<br />
b. UPDATE<br />
c. POST<br />
d. PUSH</p>
<p>17. Which of the following is not a core Rails package?</p>
<p>a. ActionMailer<br />
b. ActionController<br />
c. ActiveRecord<br />
d. ActiveResource</p>
<p>18. Which of the following is not an instance method of Object?</p>
<p>a. <code class="codecolorer text default"><span class="text">to_a</span></code><br />
b. <code class="codecolorer text default"><span class="text">to_i</span></code><br />
c. <code class="codecolorer text default"><span class="text">taint</span></code><br />
d. <code class="codecolorer text default"><span class="text">hash</span></code></p>
<p>19. Which of the following is not a valid render option?</p>
<p>a. <code class="codecolorer text default"><span class="text">:update</span></code><br />
b. <code class="codecolorer text default"><span class="text">:partial</span></code><br />
c. <code class="codecolorer text default"><span class="text">:string</span></code><br />
d. <code class="codecolorer text default"><span class="text">:file</span></code></p>
<p>20. Which of the following is not a valid ActionController filter declaration?</p>
<p>a. <code class="codecolorer text default"><span class="text">before_filter</span></code><br />
b. <code class="codecolorer text default"><span class="text">clear_filter</span></code><br />
c. <code class="codecolorer text default"><span class="text">after_filter</span></code><br />
d. <code class="codecolorer text default"><span class="text">around_filter</span></code></p>
<p>21. Which of the following is not a valid ActiveRecord callback type?</p>
<p>a. <code class="codecolorer text default"><span class="text">before_create</span></code><br />
b. <code class="codecolorer text default"><span class="text">before_validation_on_create</span></code><br />
c. <code class="codecolorer text default"><span class="text">after_destroy</span></code><br />
d. <code class="codecolorer text default"><span class="text">before_validation_on_destroy</span></code></p>
<p>22. XML is to XHTML as <em>this</em> is to HTML.</p>
<p>23. The keys of a model&#8217;s attributes are stored using this data type.</p>
<p>24. This is the RFC 2324 definition for HTTP status code 418.</p>
<p>24. Bonus: what does this do???</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">data.<span style="color:#CC0066; font-weight:bold;">gsub</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#91;</span>^\d<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">/</span>, <span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">reverse</span>.<span style="color:#9900CC;">enum_with_index</span>.<span style="color:#9900CC;">collect</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>x, i<span style="color:#006600; font-weight:bold;">|</span> &nbsp;<span style="color:#006600; font-weight:bold;">&#40;</span>i<span style="color:#006600; font-weight:bold;">%</span>2!=<span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>? <span style="color:#006600; font-weight:bold;">&#40;</span>x.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">*</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">to_s</span>.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">inject</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>sum, i<span style="color:#006600; font-weight:bold;">|</span> sum <span style="color:#006600; font-weight:bold;">+</span> i.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">&#125;</span> : &nbsp;x.<span style="color:#9900CC;">to_i</span><span style="color:#006600; font-weight:bold;">&#125;</span>.<span style="color:#9900CC;">inject</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>sum, i<span style="color:#006600; font-weight:bold;">|</span> sum <span style="color:#006600; font-weight:bold;">+</span> i<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">%</span>10 != <span style="color:#006666;">0</span></div></td></tr></tbody></table></div>
<p><script type="text/javascript">// <![CDATA[
 tag
false</p>
<p>R or RoR:
----</p>
<p>1. Ruby:
Given:
a = 'foo'
b = nil</p>
<p>first = a &#038;&#038; b
second = a and b
Are first and second equal?
No. first one equals nil, second equals foo</p>
<p>2. Ruby:
True or false: 1/2 == 0.5
false 1/2 is int, .5 is float
1/2 is equal to zero because it is an int divided by an int, they don't have the precision to give the correct answer</p>
<p>3. Ruby:
If ('1'..'10').to_a returns :</p>
<p>["1", "2", "3", "4", ..... "10"]</p>
<p>what does ('2'..'10').to_a return?</p>
<p>answer: empty array because '10' precedes '2'</p>
<p>It's ordering by string representation, not integer</p>
<p>4. Rails:</p>
<p>class Monkey << ActiveRecord::Base   has_many :bananas, :order => 'size ASC'</p>
<p>  named_scope :starting_from_massive, :order => 'size DESC'
end</p>
<p>What is the SQL for</p>
<p>@monkey.bananas
@monkey.bananas.starting_from_massive
@monkey.bananas.all(:order => nil)</p>
<p>Answer:
1: select * from monkeys order size ASC
2. select * from monkeys order size ASC, size DESC
3. select * from monkeys order size ASC</p>
<p>5. What does the H in DHH stand for? Spell it?
Hein</p>
<p>----
4. XHTML:
The DOCTYPE declaration has no closing tag
False</p>
<p>5. All XHTML tags and attributes must be in lower case
true</p>
<p>6. There is a way of describing XML data, how?
Document Type Definition</p>
<p>7. What does DTD stand for?
Document Type Definition</p>
<p>Javascript:
----
8. What is the purpose of the the swf object javascript library?
To work around the judgement against Microsoft regarding the Eolas patent defining "Embedded Objects Linked Across Systems".</p>
<p>Ajax:
A little bit tougher now: AJAX functionality is achieved by using what object?
XMLHttpRequest</p>
<p>CSS:
----
1.
Should you clear floats?
yes</p>
<p>2.
How do you properly clear floats?
overflow: hidden;
_height: 1%;</p>
<p>3.
How do you write ie specific css?
_element are for ie6
*element are for ie7</p>
<p>Bonus: what is the problem with this?</p>
<p>Multiple Choice</p>
<p>Which of the following is not a form helper method?</p>
<p>	text_field_tag
	text_input_tag
	text_area_tag
	hidden_field_tag</p>
<p>What's the default REST HTTP action verb for updating an existing record?</p>
<p>	PUT
	UPDATE
	POST
	PUSH</p>
<p>Which of the following is not a core Rails package?</p>
<p>	ActionMailer
	ActionController
	ActiveRecord
	ActiveResource</p>
<p>Which of the following is not an instance method of Object?</p>
<p>	to_a
	to_i
	taint
	hash</p>
<p>Which of the following is not a valid render option?</p>
<p>	:update
	:partial
	:string
	:file</p>
<p>Which of the following is not a valid ActionController filter declaration?</p>
<p>	before_filter
	clear_filter
	after_filter
	around_filter</p>
<p>Which of the following is not a valid ActiveRecord callback type?</p>
<p>	before_create
	before_validation_on_create
	after_destroy
	before_validation_on_destroy</p>
<p>Simple Answers</p>
<p>This is the "H" in "DHH". </p>
<p>	What is Heinemeier?
	(Spelling can count)</p>
<p>XML is to XHTML as this is to HTML.</p>
<p>	What is SGML?</p>
<p>The keys of a model's attributes are stored using this data type.</p>
<p>	What is String?
	or
	What are Strings?</p>
<p>This is the RFC 2324 definition for HTTP status code 418.</p>
<p>	What is "I'm a teapot"?
// ]]&gt;</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2010/07/rails-web-developer-quiz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TWG Kicks Off 2010 with Scrum!</title>
		<link>http://blog.twg.ca/2010/02/twg-kicks-off-2010-with-scrum/</link>
		<comments>http://blog.twg.ca/2010/02/twg-kicks-off-2010-with-scrum/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 15:47:17 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[TWG News]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[sales]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=444</guid>
		<description><![CDATA[TWG would like to formally welcome you to 2010 and talk a little bit about something we&#8217;ve decided to kick off the new year with: Scrum! Scrum is an agile framework that allows teams to become self organizing and focus on delivering high business value. In 2010, TWG is committed to delivering working, high business [...]]]></description>
			<content:encoded><![CDATA[<p>TWG would like to formally welcome you to 2010 and talk a little bit about something we&#8217;ve decided to kick off the new year with: Scrum!</p>
<p>Scrum is an agile framework that allows teams to become self organizing and focus on delivering high business value.</p>
<p>In 2010, TWG is committed to delivering working, high business value, high quality software, faster.  This is something Scrum enables us to do.</p>
<h2>Why Change?</h2>
<p>While TWG has previously used plenty of agile practices, the time has come to formalize the process so that we can get all the benefits of being an agile organization.</p>
<h2>How Is Agile Different?</h2>
<p>Many agencies and web development companies typically insist on gathering every single requirement up front, locking them down, forcing the client to sign off, swearing that these requirements will never change.  We now know better.  Requirements will change, we learn as we go, and we will inevitably discover new and more valuable features as the project comes together.  TWG is using Scrum to build partnering relationships with our clients, so that we can see and adapt to requirements as they emerge, and deliver better and more useful websites and software.</p>
<h2>Build Less Software&#8230;</h2>
<p>So how do you build high value, high quality software, quickly?  Build less, but build it better!</p>
<p>This may seem unusual, but remember, when you start a project, application or a web site, you don&#8217;t really know what you or your users want until you get your hands on it and start playing with it.  This is normal.  So instead of trying to plan it all up front, we&#8217;re going to be working on building the things you know right now, and get them done, Done, DONE!</p>
<p>Nothing gets feedback better than working software, so why wait until the end of your project to see it?  Once you&#8217;ve seen it and learned from it, you can add to it, change it or even scrap it!</p>
<p>At TWG, we&#8217;re starting Scrum with 1 week sprints.  These are time boxed working periods where at the end, our goal is to deliver working software, as opposed to things like documents, mock-ups or in-progress features.  This is a tough, aggressive process that we&#8217;re working on, but we feel in the end it will enable us to deliver better, more valuable software, faster.</p>
<h2>&#8230;Get more value (rather than a laundry list).</h2>
<p>Many web development companies will work with you to look around at all the sites that are out there, collect a large laundry lists of  possible features that you might want your system to do, and then give a quote on building that.  You sign off, and the work gets started.  You wait potentially months until all the features are built, the schedule might slip two or three times, and when you finally get it, you discover you really didn&#8217;t end up with the software you really hoped for or needed.</p>
<p>Not only that, but while the software was being built, the market changed and some features became irrelevant or new features became more critical.  Too late to change now.  I guess you&#8217;re stuck.</p>
<p>What if you had your list of features prioritized in order of importance/ROI and what if you got the most important features first each iteration &#8211; say every week?  Maybe you&#8217;d find out you didn&#8217;t need to build those last few features since they weren&#8217;t all that valuable anyway, or maybe you&#8217;d find you could swap some of those less valuable ones out for new ones.  Who wouldn&#8217;t want that kind of flexibility?</p>
<h2>What Comes Next?</h2>
<p>This transition is a work in progress and we&#8217;re going to give you regular updates and insights into our experiences with Scrum.  You&#8217;ll get to see some of the nitty-gritty details like our task board, and burn up charts, as well as some of the struggles and discoveries we make as we go down this road.  We hope you&#8217;ll keep your eye on our blog and provide us with any feedback or experiences you&#8217;ve had.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2010/02/twg-kicks-off-2010-with-scrum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remember Rcov?</title>
		<link>http://blog.twg.ca/2009/12/remember-rcov/</link>
		<comments>http://blog.twg.ca/2009/12/remember-rcov/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 21:31:21 +0000</pubDate>
		<dc:creator>Oleg</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[rake task]]></category>
		<category><![CDATA[rcov]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=429</guid>
		<description><![CDATA[Rcov helps to identify code that is not being being hit by your tests (or maybe some functions left behind after refactoring). It&#8217;s very easy to get it running as well: $ sudo gem install rcov Plug this rake task into /lib/tasks/rcov.rake require 'rcov/rcovtask' namespace :rcov do &#160; desc 'Measures test coverage using rcov' &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Rcov helps to identify code that is not being being hit by your tests (or maybe some functions left behind after refactoring). It&#8217;s very easy to get it running as well:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo gem install rcov</div></div>
<p>Plug this rake task into /lib/tasks/rcov.rake</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rcov/rcovtask'</span><br />
<br />
namespace <span style="color:#ff3333; font-weight:bold;">:rcov</span> <span style="color:#9966CC; font-weight:bold;">do</span><br />
&nbsp; desc <span style="color:#996600;">'Measures test coverage using rcov'</span><br />
&nbsp; <span style="color:#6666ff; font-weight:bold;">Rcov::RcovTask</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:test</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>rcov<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; rcov.<span style="color:#9900CC;">pattern</span> &nbsp; &nbsp;= <span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#40;</span>test<span style="color:#006600; font-weight:bold;">/</span>unit<span style="color:#006600; font-weight:bold;">/**/*</span>_test.<span style="color:#9900CC;">rb</span> test<span style="color:#006600; font-weight:bold;">/</span>functional<span style="color:#006600; font-weight:bold;">/**/*</span>_test.<span style="color:#9900CC;">rb</span> test<span style="color:#006600; font-weight:bold;">/</span>integration<span style="color:#006600; font-weight:bold;">/**/*</span>_test.<span style="color:#9900CC;">rb</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; rcov.<span style="color:#9900CC;">output_dir</span> = <span style="color:#996600;">'rcov'</span><br />
&nbsp; &nbsp; rcov.<span style="color:#9900CC;">verbose</span> &nbsp; &nbsp;= <span style="color:#0000FF; font-weight:bold;">true</span><br />
&nbsp; &nbsp; rcov.<span style="color:#9900CC;">rcov_opts</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">'--exclude &quot;gems/*&quot;'</span><br />
&nbsp; &nbsp; rcov.<span style="color:#9900CC;">rcov_opts</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">'--rails'</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>And finally run it:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ rake rcov:test</div></div>
<p>It&#8217;s so easy you have no excuse not to have it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/12/remember-rcov/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Harnessing Ruby Enumerable</title>
		<link>http://blog.twg.ca/2009/12/harnessing-ruby-enumerable/</link>
		<comments>http://blog.twg.ca/2009/12/harnessing-ruby-enumerable/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 21:53:16 +0000</pubDate>
		<dc:creator>Scott Tadman</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=381</guid>
		<description><![CDATA[You&#8217;re probably afraid to ask about some of the methods in the Ruby Enumerable mixin. Not only are there a whole bunch of them, 41 in Ruby 1.9 to be exact, but selecting the right one for the problem can be an exercise in frustration. Part of the problem is there&#8217;s no easy way to [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re probably afraid to ask about some of the methods in the Ruby Enumerable mixin. Not only are there a whole bunch of them, 41 in Ruby 1.9 to be exact, but selecting the right one for the problem can be an exercise in frustration. Part of the problem is there&#8217;s no easy way to identify what method might suit your requirements. While the names are usually self-explanatory, it can be tricky to remember block arguments or if they return an Array or a particular element.</p>
<p>Any toolbox needs to be organized, so it&#8217;s probably best to sort the various Enumerable methods into groups based on the kind of result you want to get. Grouped together like this, the methodology within Ruby becomes more apparent.</p>
<style> .enumerable th { font-weight: bold; padding-bottom: 5px; border-bottom: 1px solid #ccc;} .enumerable td { padding: 5px 0px 5px 0px; } .enumerable td.remark { padding: 0px 5px 20px 30px; } .enumerable .method, span.method { font-family: monospace; } .enumerable .optional { color: #999; font-style: italic; } .enumerable .clarify { color: #999; } </style>
<h2>Conventions</h2>
<p>In this description, &#8220;true / false&#8221; refers to values that are equivalent to true, or equivalent to false. In practical terms this means that <span class="method">nil</span> and <span class="method">false</span> are both considered false, and everything else is non-false, (or in general terms, true). Note: things that evaluate as true include what might be considered false in other languages such as 0, empty strings, and empty Array or Hash structures.</p>
<p>When describing the blocks, e refers to an element in the set. For an Array, this is simply the element at a particular index. For a Hash this is a key/value pair, so the block semantics should be expanded to <span class="method">{ |(k,v)| }</span> or <span class="method">e.first</span> and <span class="method">e.last</span> will need to be used within the block.</p>
<h2>Assessment</h2>
<p>One of the simplest features of Enumerable is the methods that provide a quick true/false assessment based on the content involved. Often these will be used to decide how to handle an Array or Hash, or if its in a condition that can be utilized.</p>
<table class="enumerable" border="0" width="100%">
<tbody>
<tr>
<th width="25%">Method</th>
<th width="20%">Arguments</th>
<th width="30%">Block Definition</th>
<th width="25%">Return</th>
</tr>
<tr>
<td class="method">all?</td>
<td></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span><br />
<span class="optional">* Optional</span></td>
<td><span class="method">true / false</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Runs each element through the given block with and returns true if <strong>all</strong> of the block results evaluate true, otherwise false. Without a block returns true if all the elements evaluate as true, otherwise false.</td>
</tr>
<tr>
<td class="method">any?</td>
<td></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span><br />
<span class="optional">* Optional</span></td>
<td><span class="method">true / false</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Runs each element through the given block with and returns true if <strong>any</strong> of the block results evaluate true, otherwise false. Without a block returns true if any the elements evaluate as true, otherwise false.</td>
</tr>
<tr>
<td class="method">none?</td>
<td></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span><br />
<span class="optional">* Optional</span></td>
<td><span class="method">true / false</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Runs each element through the given block with and returns true if <strong>none</strong> of the block results evaluate true, otherwise false. Without a block returns true if none the elements evaluate as true, otherwise false.</td>
</tr>
<tr>
<td class="method">one?</td>
<td></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span><br />
<span class="optional">* Optional</span></td>
<td><span class="method">true / false</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Runs each element through the given block with and returns true if <strong>one</strong> of the block results evaluate true, otherwise false. Without a block returns true if one the elements evaluate as true, otherwise false.</td>
</tr>
</tbody>
</table>
<h2>Single Element</h2>
<p>Often you&#8217;ll want to extract a single element from a set. In this case there are many ways to get what you want, each with their particular quirks.</p>
<table class="enumerable" border="0" width="100%">
<tbody>
<tr>
<th width="25%">Method</th>
<th width="20%">Arguments</th>
<th width="30%">Block Definition</th>
<th width="25%">Return</th>
</tr>
<tr>
<td class="method">detect</td>
<td class="method">ifnone <span class="clarify">= nil</span></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span></td>
<td><span class="method"><em>element</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Runs each element through the given block with and returns the first element for which the block result is true. If all return false, the result is nil.</td>
</tr>
<tr>
<td class="method">find</td>
<td class="method">ifnone <span class="clarify">= nil</span></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span></td>
<td><span class="method"><em>element</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">The same as <span class="method">detect</span>, this runs each element through the given block with and returns the first element for which the block result is true. If all return false, the result is nil.</td>
</tr>
<tr>
<td class="method">first</td>
<td class="method"></td>
<td></td>
<td><span class="method"><em>element</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Returns the first element in the set, of if the set is empty then nil.</td>
</tr>
<tr>
<td class="method">max</td>
<td></td>
<td><span class="method">{ |a,b| &#8230; } <span class="clarify">=&gt; -1 / 0 / 1</span></span><br />
<span class="optional">* Optional</span></td>
<td><span class="method"><em>element</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Returns the largest element in the set, of if the set is empty then nil. The result of the optional block should be compatible with Comparable and return -1, 0, or 1.</td>
</tr>
<tr>
<td class="method">max_by</td>
<td></td>
<td><span class="method">{ |e| &#8230; }</span></td>
<td><span class="method"><em>element</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Returns the largest element in the set where comparisons are performed on the result of the block, of if the set is empty then nil. Anything returned by the block must be compatible with Comparable.</td>
</tr>
<tr>
<td class="method">min</td>
<td></td>
<td><span class="method">{ |a,b| &#8230; } <span class="clarify">=&gt; -1 / 0 / 1</span></span><br />
<span class="optional">* Optional</span></td>
<td><span class="method"><em>element</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Returns the smallest element in the set, of if the set is empty then nil. The result of the optional block should be compatible with Comparable and return -1, 0, or 1.</td>
</tr>
<tr>
<td class="method">min_by</td>
<td></td>
<td><span class="method">{ |e| &#8230; }</span></td>
<td><span class="method"><em>element</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Returns the smallest element in the set where comparisons are performed on the result of the block, of if the set is empty then nil. Anything returned by the block must be compatible with Comparable.</td>
</tr>
</tbody>
</table>
<h2>Filtering</h2>
<table class="enumerable" border="0" width="100%">
<tbody>
<tr>
<th width="25%">Method</th>
<th width="20%">Arguments</th>
<th width="30%">Block Definition</th>
<th width="25%">Return</th>
</tr>
<tr>
<td class="method">grep</td>
<td class="method">regexp</td>
<td><span class="method">{ |e| &#8230; }</span><br />
<span class="optional">* Optional</span></td>
<td><span class="method">Array</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Matches each element against the supplied regexp and returns all that match in an Array. If a block is supplied, all matching elements are transformed by the block before being inserted into the result Array, which avoids having to chain the result through a <span class="method">map</span> call.</td>
</tr>
<tr>
<td class="method">reject</td>
<td class="method"></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span></td>
<td><span class="method">Array</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Runs all elements through the supplied block and excludes those from the result array where the block evaluates as true.</td>
</tr>
<tr>
<td class="method">select</td>
<td class="method"></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span></td>
<td><span class="method">Array</span></td>
</tr>
<tr>
<td class="remark" colspan="4">The inverse of , this runs all elements through the supplied block and includes those from the result array where the block evaluates as true.</td>
</tr>
<tr>
<td class="method">select</td>
<td class="method"></td>
<td><span class="method">{ |e| &#8230; } <span class="clarify">=&gt; true / false</span></span></td>
<td><span class="method">Array</span></td>
</tr>
<tr>
<td class="remark" colspan="4">The inverse of , this runs all elements through the supplied block and includes those from the result array where the block evaluates as true.</td>
</tr>
</tbody>
</table>
<h2>Transformation</h2>
<p>There are a few powerful methods for transforming the content of one set into an Array.</p>
<table class="enumerable" border="0" width="100%">
<tbody>
<tr>
<th width="25%">Method</th>
<th width="20%">Arguments</th>
<th width="30%">Block Definition</th>
<th width="25%">Return</th>
</tr>
<tr>
<td class="method">collect</td>
<td class="method"></td>
<td><span class="method">{ |e| &#8230; }</span></td>
<td><span class="method">Array</span></td>
</tr>
<tr>
<td class="remark" colspan="4">Runs each element through the provided block and puts each block result in the Array that is returned.</td>
</tr>
<tr>
<td class="method">map</td>
<td class="method"></td>
<td><span class="method">{ |e| &#8230; }</span></td>
<td><span class="method">Array</span></td>
</tr>
<tr>
<td class="remark" colspan="4">The same as <span class="method">collect</span>, runs each element through the provided block and puts each block result in the Array that is returned.</td>
</tr>
<tr>
<td class="method">inject</td>
<td class="method">memo <span class="clarify">= first</span></td>
<td><span class="method">{ |memo, e| &#8230; }</span></td>
<td><span class="method"><em>last block result</em> / nil</span></td>
</tr>
<tr>
<td class="remark" colspan="4">This is perhaps the most understood and under-utilized method in the Enumerable toolkit. In general terms, this method takes a seed &#8220;memo&#8221; value, and runs that through the block in conjunction with each element. The result of the first block call is supplied to the second, and so on, which leaves the door wide open as to what this method can do. For instance, every other Enumerable method can be expressed as a form of <span class="method">inject</span>.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/12/harnessing-ruby-enumerable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Active state for link_to == active_link_to. A solution for building navigation systems in Rails.</title>
		<link>http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/</link>
		<comments>http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 18:07:45 +0000</pubDate>
		<dc:creator>Oleg</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[active state]]></category>
		<category><![CDATA[active_link]]></category>
		<category><![CDATA[active_link_to]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=346</guid>
		<description><![CDATA[I have a question for you. How do you deal with the logic of setting links as active in your navs? Actually, I don&#8217;t want to know. It&#8217;s probably awful. I might have a pretty good solution for you. Let&#8217;s take a look at a very simple nav. These examples all use HAML: %ul &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I have a question for you. How do you deal with the logic of setting links as active in your navs?</p>
<p>Actually, I don&#8217;t want to know. It&#8217;s probably awful. I might have a pretty good solution for you. Let&#8217;s take a look at a very simple nav. These examples all use <a href="http://haml-lang.com/">HAML</a>:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Home'</span>, home_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>Right, that&#8217;s great. But how do I insert logic as to what link gets marked as active? To begin, let&#8217;s quickly install this random gem:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> active_link_to</div></div>
<p>And then change our nav a bit:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Home'</span>, home_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>And that&#8217;s pretty much it.</p>
<p>So, for example, if you navigate to /kittens/1-my-fluffy-kitten navigation link for &#8216;Kittens&#8217; will have &#8216;active&#8217; class attached to it. It&#8217;s almost like magic.</p>
<p>You probably noticed that &#8216;Home&#8217; is highlighted as well. It happened because whatever URL you are currently on is a child of the home_path. I guess we want to mark it as active only if we find ourselves on the home page and not anywhere else. We can fix this:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Home'</span>, home_path, <span style="color:#ff3333; font-weight:bold;">:active</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>:<span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:self_only</span><span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>Hey, wanna render a sub nav when you find yourself browsing /puppies or any page under that URL? It&#8217;s just sooo easy:</p>
<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Home'</span>, home_path, <span style="color:#ff3333; font-weight:bold;">:active</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>:<span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:self_only</span><span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li<br />
&nbsp; &nbsp; = active_link_to <span style="color:#996600;">'Puppies'</span>, puppies_path<br />
&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">-</span> <span style="color:#9966CC; font-weight:bold;">if</span> is_active_link?<span style="color:#006600; font-weight:bold;">&#40;</span>puppies_path<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">%</span>ul<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Big'</span>, big_puppies_path<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Small'</span>, small_puppies_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Kittens'</span>, kittens_path<br />
&nbsp; <span style="color:#006600; font-weight:bold;">%</span>li= active_link_to <span style="color:#996600;">'Froggies'</span>, froggies_path</div></div>
<p>And that&#8217;s the skinny of what active_link_to is for.</p>
<p>For more documentation on more functionality checkout project on GitHub: <a href="http://github.com/theworkinggroup/active_link_to">http://github.com/theworkinggroup/active_link_to</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/11/active-state-for-link_to-active_link_to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a world of difference with 0.05em</title>
		<link>http://blog.twg.ca/2009/11/making-a-world-of-difference-with-0-05em/</link>
		<comments>http://blog.twg.ca/2009/11/making-a-world-of-difference-with-0-05em/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 18:28:09 +0000</pubDate>
		<dc:creator>Vivian</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[designer vs. developer]]></category>
		<category><![CDATA[letter-spacing]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=298</guid>
		<description><![CDATA[Typographic sensibility can make or break a design, both in print pieces and online. In web design, attention to typography is especially important since the majority of online content is written information. It is often said that the strength of a web designer can be judged through their ability to create an engaging UI with [...]]]></description>
			<content:encoded><![CDATA[<p>Typographic sensibility can make or break a design, both in print pieces and online. In web design, attention to typography is especially important since the majority of online content is <a href="http://informationarchitects.jp/the-web-is-all-about-typography-period/" target="new">written information.</a> It is often said that the strength of a web designer can be judged through their ability to create an engaging UI with just text.</p>
<p>There are many tools and tricks available to web designers when it comes to styling type: <a href="http://www.kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/" target="new">size</a>, <a href="http://kuler.adobe.com/" target="new">colour</a>, <a href="http://en.wikipedia.org/wiki/Typographic_alignment" target="new">alignment</a>, <a href="http://www.dev-archive.net/articles/line-height.html" target="new">line-height</a> (leading), <a href="http://webdesign.about.com/od/examples/l/blstyleswordspacingexamples.htm" target="new">word-spacing</a> (don&#8217;t do it), but an important one I find most often ignored by developers is <a href="http://en.wikipedia.org/wiki/Letter-spacing" target="new">letter-spacing</a> (tracking). Letter-spacing is literally the space between the letters&#8230; and it can make a big difference in terms of legibility and the overall feel of a site.</p>
<p><img src="http://blog.twg.ca/wp-content/uploads/2009/10/letter-spacing-importance2.jpg" alt="letter-spacing-importance" title="letter-spacing-importance" width="552" height="170" class="alignleft size-full wp-image-340" /></p>
<h2>&#8220;Don’t blame me; you forgot the letter-spacing&#8230;&#8221;</h2>
<p>As a designer, it feels like I am often getting flack from developers for type that is &#8220;too small&#8221;. Ninety-nine percent of the time after I hand off an Illustrator file or PSD of a design, the coded page comes back to me without any letter-spacing included in the CSS. Letter-spacing is like air: you don&#8217;t really notice it, but it makes a difference whether it is there or not. </p>
<h2>It’s easy, just do it.</h2>
<p>I&#8217;m really bad at math, but the other day it dawned on me how to figure out the CSS letter-spacing measurement from my AI (or PSD) file. Tracking in Adobe programs is measured in 1/1000em so when the design file specifies &#8220;50&#8243; or &#8220;100&#8243; in the tracking character palette, it is 100/1000 = 0.1em. That 0.1em can take a 10px all caps style from &#8220;too small&#8221; to &#8220;completely awesome&#8221;. See below:</p>
<p style="letter-spacing:0em; font-size:10px; color: #70BC1F">EXAMPLE WITHOUT ANY LETTER-SPACING, OMG SO TIGHT, NOT IN A GOOD/SEXY WAY.</p>
<p style="letter-spacing:0.1em; font-size:10px; color: #70BC1F">ADDED 0.1EM OF LETTER-SPACING. LOOK HOW AMAZING IT IS NOW.</p>
<p style="letter-spacing:2px; font-size:10px; color: #70BC1F">2PX OF LETTER-SPACING? CRAZYTOWN! GET THE EFF OUT OF HERE!</p>
<h2>Of course there are issues&#8230;</h2>
<p>Like in many cases, basically Firefox is the only browser that <a href="http://blarg.aaronpropst.com/IE-CSS-does-letter-spacing-stupidly" target="new">does</a> <a href="http://vhg-design.com/blog/tag/letter-spacing/" target="new">letter-spacing</a> <a href="http://www.sitepoint.com/forums/showthread.php?p=4203006" target="new">right</a>. Depending on your product/audience, this may not be an issue, but it is definitely something to keep in mind when specifying sub-pixel measurements that may be rounded up or down in browsers other than Firefox.</p>
<h2>Negative letter-spacing: it’s just a fad, right?</h2>
<p style="letter-spacing:-0.1em; font-size:30px; color: #B3B3B3; font-family:helvetica, arial;">This is so tight, yo! I can’t even read it!</p>
<p>Over the last couple years a big web typography trend has been the bold sans type with negative letter-spacing, <a href="http://css-tricks.com/helvetica-bold-big-negative-letter-spacing/" target="new">&#8220;all the cool kids are doing it.&#8221;</a> While I can see the appeal (in that it speaks to the whole web 2.0 design aesthetic), I expect that this trend will soon remedy itself. Letter-spacing is meant to be applied with a gentle touch, and when heavy-handed negative (or positive) tracking occurs, it can definitely affect the legibility, as some of those examples clearly show. </p>
<h2>The bottom line</h2>
<p>Always use letter-spacing to your advantage and not to your own detriment, just  because it’s &#8220;in&#8221;. Yell at developers when they omit it from the CSS and then decide to blame you, the designer. And if that doesn’t work, do what I had to do: get the keys to the site or app, then tweak to your heart’s content.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/11/making-a-world-of-difference-with-0-05em/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>geeks + beer + friday = ?</title>
		<link>http://blog.twg.ca/2009/10/geeks-beer-friday/</link>
		<comments>http://blog.twg.ca/2009/10/geeks-beer-friday/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 21:50:28 +0000</pubDate>
		<dc:creator>Georges</dc:creator>
				<category><![CDATA[Friday]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[geeks]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=291</guid>
		<description><![CDATA[Every so often a text editor war will flare up in the office. We all have our favourites, but no one likes vi the way Scott likes vi. Here&#8217;s the first in Dr. Tadman&#8216;s twelve part lecture series on how vi will make your life better: Click For Full-Size Image]]></description>
			<content:encoded><![CDATA[<p>Every so often a text editor war will flare up in the office. We all have our favourites, but no one likes vi the way <a href="http://theworkinggroup.ca/about-us/our-team#scott">Scott</a> likes vi.</p>
<p>Here&#8217;s the first in <a href="http://theworkinggroup.ca/about-us/our-team#scott">Dr. Tadman</a>&#8216;s twelve part lecture series on how vi will make your life better:</p>
<p style="text-align: center;"><a href="http://blog.twg.ca/wp-content/uploads/2009/10/TWGtadman-viforbeginners.jpg"><img class="size-full wp-image-292 aligncenter" title="TWGtadman-viforbeginners_thumb" src="http://blog.twg.ca/wp-content/uploads/2009/10/TWGtadman-viforbeginners_thumb.jpg" alt="TWGtadman-viforbeginners_thumb" width="640" height="200" /></a></p>
<p style="text-align: center;"><a href="http://blog.twg.ca/wp-content/uploads/2009/10/TWGtadman-viforbeginners.jpg">Click For Full-Size Image</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/10/geeks-beer-friday/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails mass mailing &#8211; it shouldn&#8217;t be this complicated</title>
		<link>http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/</link>
		<comments>http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 21:16:32 +0000</pubDate>
		<dc:creator>Jack</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[ar_mailer]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[posategapp]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.theworkinggroup.ca/?p=57</guid>
		<description><![CDATA[The requests we get from our clients for &#8220;social networking&#8221; type tools and features has grown exponentially over the past two years. To make a user experience relevant, easy, secure, means that an application will need to send email notifications to that user (to register, to tell them of friend&#8217;s messages, to send them newsletters [...]]]></description>
			<content:encoded><![CDATA[<p>The requests we get from our clients for &#8220;<em>social networking</em>&#8221; type tools and features has grown exponentially over the past two years. To make a user experience relevant, easy, secure, means that an application will need to send email notifications to that user (to register, to tell them of friend&#8217;s messages, to send them newsletters or updates, to send tickets, calendar bookings .. the list goes on).<br />
<strong><br />
Why is this a problem?</strong> Because sending an email is not an instantaneous action. The more emails you try to send, the longer you may have to wait as the application sends them. Imagine an app that lets you invite 300 friends to an event. Multiply this with 300 people sending the same invite to their friends.</p>
<p>While Rails was kind enough to provide a simple way to send emails, it left out one important detail. <em>You can only send one at a time!</em></p>
<p>If you find yourself in the unfortunate position where you need to mass mail then you&#8217;re on your own. So what do you do? You Google around of course. Someone is bound to have figured this one out.</p>
<p><strong>It looks like there are 3 ways to solve this:</strong></p>
<p><strong>1. Use existing email marketing services</strong></p>
<p>You can go with this option. There are plenty out there: Mail Chimp, Constant Contact, Thin Data, Campaign Monitor, Campaigner and others. All you need to do is generate some kind of mailing list and import it into one of these systems and then keep it up to date. But that&#8217;s not always practical. Not if you want your users to be able to initiate the mass mailing by themselves.  Don&#8217;t get me wrong, these services are great at what they do, but what we really want to do is to send mass emails from our own app.</p>
<p><strong>2. Use existing code</strong></p>
<p>If you really want your Rails app to be able to send mass mails at a click of a button you can try using Eric Hodel&#8217;s ar_mailer which is on version 1.4.0 as of June 2009. This has the advantage of letting you use the email addresses that you already have on your system (no exporting and importing to a different system) but before you get to that you still have to integrate it with whatever version of Rails you happen to be using.  Assuming you get it working properly, now you have a brand new background process to take care of.</p>
<p>Ar_mailer is great but leaves you half way there.</p>
<p>* The queue is not smart enough to prioritize emails. If one user sends 5000 invitations and after that another user wants to recover his password, he&#8217;ll have to wait until all 5000 emails are sent before he gets his password back. The users receiving the invitation won&#8217;t notice if  it takes a bit longer to reach them, but the guy that is trying to recover his password will be upset if he doesn&#8217;t get it right away. This is obviously not good enough.<br />
* How do you monitor if an email has been sent or failed?<br />
* If you have an email template and your client wants to change it all the time, what do you do?</p>
<p><strong>3. Build it all from scratch</strong></p>
<p>Even if you decide to do it yourself from scratch you&#8217;ll still need a queue to store the emails that will be sent at some time in the near future by another process running in the background. From there on, it depends on what you really need. Be prepared to put aside some extra time because it ain&#8217;t simple.</p>
<p><strong>So what would be the perfect solution? </strong>Simply put: I don&#8217;t want to have to worry about it. I want to be able to say: &#8220;Here&#8217;s my email, here&#8217;s the list of people I want it sent to. Go and do it &#8230; please&#8221;.</p>
<p>Wouldn&#8217;t that be great? Sure it would! We&#8217;ve encountered this problem enough times to make us want to solve it for good.</p>
<p><strong>And so we&#8217;ve set out to build it and this is what we think a mass mailing solution:</strong></p>
<ol>
<li>I want to be able to use it independently of the language I&#8217;m coding in &#8211; it needs to have an API</li>
<li>I want to be able to use the same code I have right now (layouts, email templates, etc.) &#8211; it needs to integrate easily</li>
<li>I want to know if a specific email was sent, failed or if it hasn&#8217;t been sent yet and I want to know why &#8211; it needs reporting</li>
<li>If a client complains that the emails aren&#8217;t rendering correctly I want to be able to see what they are receiving &#8211; it needs to let me look at the emails sent</li>
<li>I want to be able to easily resend any email &#8211; it needs to let me act on it</li>
<li>I want to create and manage email templates so that my client can edit them without asking me every time and without forcing me to change the code and to deploy my app all over again &#8211; it needs an optional template management system.</li>
<li>I want the queue system to be smart enough to distinguish between a single email and a batch of 5000 emails and prioritize them accordingly &#8211; it needs a smart queue system.</li>
<li>And most importantly, how can all of this be done with minimal effort to set it up each time I create a new app. &#8211; it needs a plugin.</li>
</ol>
<p><strong>Postage App!</strong></p>
<p style="text-align: center;"><img class="size-full wp-image-204 aligncenter" title="Mass mailing app" src="http://theworkinggroup.ca/system/files/19/original/postageapp-mailing-diagram.jpg" alt="Mass mailing app" width="525" height="300" /></p>
<p>We are currently developing this system which will help us build better apps. We&#8217;re building it according to our needs and we think that these might also be the needs of other developers out there. <a href="http://postageapp.com/" target="_blank">Check it out and sign up</a> for an update on the developer free release!</p>
<p style="text-align: center;"><img src="file:///Users/jneto/Library/Caches/TemporaryItems/moz-screenshot.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/09/rails-mass-mailing-it-shouldnt-be-this-complicated/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>4 Fears of @font-face</title>
		<link>http://blog.twg.ca/2009/09/4-fears-of-font-face/</link>
		<comments>http://blog.twg.ca/2009/09/4-fears-of-font-face/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 14:27:29 +0000</pubDate>
		<dc:creator>Vivian</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://blog.twg.ca/?p=119</guid>
		<description><![CDATA[The future of web typography seems to be almost here with Firefox 3.5 supporting @font-face, making web-safe fonts a thing of the past. Through CSS3&#8242;s linking/embedding of any font file, @font-face opens the floodgates to the millions of font options available to designers. The design possibilities are extremely exciting, but in the coming @font-face infancy, [...]]]></description>
			<content:encoded><![CDATA[<p>The future of web typography seems to be almost here with Firefox 3.5 supporting @font-face, making web-safe fonts a thing of the past. Through CSS3&#8242;s linking/embedding of any font file, @font-face opens the floodgates to the millions of font options available to designers. The design possibilities are extremely exciting, but in the coming @font-face infancy, we can likely expect a dark period of uglification.</p>
<ol>
<li>Bad typography is too easy</li>
<li>Illegible and annoying sites</li>
<li>@font-face + CSS3 effects = disaster</li>
<li>Pirates and the shipwrecked</li>
</ol>
<p><img src="http://theworkinggroup.ca/system/files/17/original/font-quality-chart.jpg" alt="The quality of typefaces in existence pie chart" width="500" height="250" /></p>
<h2>Bad typography is too easy</h2>
<p>A lot of bad or amateur-looking print design is victim of poor type decisions paired with improper typographic finesse. With all the choice out there, why pick Papyrus or Hobo for a menu or brochure? It happens far too often in print and now it can happen easily online with @font-face. For every beautifully crafted typeface, there are probably 10 mediocre ones, and 25 really fugly ones; the odds are stacked against us, but hopefully designers will exercise restraint and common sense.</p>
<h2>Illegible and annoying sites</h2>
<p>@font-face has the potential to marry beautiful typography with usable, accessible, and indexable content, but there are also foreseeable legibility disasters in this free-for-all. One of the best things about web-safe fonts, such as Verdana and Georgia, is that they are fairly cross-platform reliable, and have proven legibility. With its large x-height, giant counters, and distinctly varied characters, Verdana was designed to be read easily on-screen at small sizes. However when used in print, it sometimes falls comically flat – look at <a href="http://www.idsgn.org/posts/ikea-says-goodbye-to-futura/" target="new">how IKEA just screwed</a> their print branding by using this traditionally web typeface.</p>
<p>Techniques like <a href="http://github.com/blog/363-cuf%F3n-a-sifr-alternative" target="new">Cufón</a> and <a href="http://wiki.novemberborn.net/sifr/" target="new">sIFR</a> are technologically hefty, often limiting use just to headline text. Since @font-face is lightweight enough to use throughout an entire site, paragraph text styled poorly in an awkward font can easily impede legibility and annoy users. It&#8217;s not worth sacrificing access to the content just to make something look nicer.</p>
<p><img src="http://theworkinggroup.ca/system/files/18/original/text-shadow-hideous.jpg" alt="Text-shadow, Hobo, hideousness" width="500" height="230" /></p>
<h2>CSS3 effects + @font-face = the internet circa 1995</h2>
<p>Pair a little cheesy text-shadowing with a &#8220;funky&#8221; typeface and the internet has been set back 15 years. There is probably never an online situation that calls for drop-shadowed, glowing, or flaming type; we&#8217;re talking web design, not cereal boxes. Like crappy flash intros, just because it exists, doesn&#8217;t mean it should be used. Let&#8217;s hope that clients don&#8217;t get a whiff of this one and start requesting it for home page headlines.</p>
<h2>Pirates and the shipwrecked</h2>
<p>Though it can be argued that pirates will always find a way to get what they want for free, why make it any easier to steal fonts? If used incorrectly, @font-face can offer up copyrighted font files for free. Solutions like <a href="http://blog.typekit.com/" alt="Typekit">Typekit</a> are taking steps in the right direction, but there are bound to be inexperienced slip-ups at first. Browser compatibility issues with @font-face may also end up leaving users on older browsers behind, viewing (in theory) less typographically rich content. It will be fun watching the online typographic revolution unfold once copyright issues are resolved, and cross-browser support is ready. Hopefully @font-face will make the internet a more beautiful place, and not like a bunch of designers got drunk on the punch and barfed typefaces everywhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.twg.ca/2009/09/4-fears-of-font-face/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
