<?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>12 Spokes</title>
	<atom:link href="http://blog.12spokes.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.12spokes.com</link>
	<description>Make the web go 'round</description>
	<lastBuildDate>Wed, 22 Feb 2012 22:12:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How-to: Toggling text with preview</title>
		<link>http://blog.12spokes.com/iphone-development/how-to-toggling-text-with-preview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-toggling-text-with-preview</link>
		<comments>http://blog.12spokes.com/iphone-development/how-to-toggling-text-with-preview/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 22:12:41 +0000</pubDate>
		<dc:creator>mattbishop</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=743</guid>
		<description><![CDATA[In my years of development, when I come to a point where I stop and scratch my head and say, “Hmm, how am I going to do this”, the obvious next step is to look and see if anyone else has already done solved the problem. Chances are they have. All developers know this. The [...]]]></description>
			<content:encoded><![CDATA[<p dir="ltr">In my years of development, when I come to a point where I stop and scratch my head and say, “Hmm, how am I going to do this”, the obvious next step is to look and see if anyone else has already done solved the problem. Chances are they have. All developers know this.</p>
<p dir="ltr">The hard part is remembering to pass along the favor. Of course, once you solve the problem, and the solution is staring you in the face, it seems so obvious that it hardly merits mentioning or blogging. Isn’t it obvious how to do that now? Well, here&#8217;s one of those. I was working on this problem, and when I tried to see if anyone else had already done it, I didn’t immediately find an answer. It&#8217;s time to patch that little hole.</p>
<p dir="ltr">I was working on a website that was aimed at mobile devices. When you&#8217;re working with mobile devices, you&#8217;re inevitably trying to fit a lot of content onto a small screen and you have to hide things. In this case it was text. I decided to have a teaser of text displayed upon initial loading, and if the viewer decided to read it, they could simply toggle a link to display or hide the bulk of the text. I needed the text to stop dynamically in the middle of a sentence, and when the user clicked the “ Show me more” link, the rest of the text magically appeared, seamless with the teaser text that was there before. Here&#8217;s how I did it.</p>
<p dir="ltr">I created a couple of functions to truncate the text.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#truncate description</span>
<span style="color:#0066ff; font-weight:bold;">@contracted_description</span> = truncate_text<span style="color:#006600; font-weight:bold;">&#40;</span>@location.<span style="color:#9900CC;">description</span>,<span style="color:#006666;">100</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#0066ff; font-weight:bold;">@remaining_description</span> = truncate_remainder<span style="color:#006600; font-weight:bold;">&#40;</span>@location.<span style="color:#9900CC;">description</span>, <span style="color:#006666;">100</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p dir="ltr">With my helper functions looking like this..</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> truncate_text<span style="color:#006600; font-weight:bold;">&#40;</span>text, len<span style="color:#006600; font-weight:bold;">&#41;</span>
  chars = text.<span style="color:#9900CC;">mb_chars</span> <span style="color:#008000; font-style:italic;">#converts string to char</span>
  <span style="color:#9966CC; font-weight:bold;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span>chars<span style="color:#006600; font-weight:bold;">&#91;</span>len<span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#996600;">' '</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#make sure the break doesn't happen in the middle of a word</span>
    len = len<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  trunc_text = <span style="color:#006600; font-weight:bold;">&#40;</span>chars.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&gt;</span> len ? chars<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span>...<span style="color:#9900CC;">len</span><span style="color:#006600; font-weight:bold;">&#93;</span> : text<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">to_s</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> truncate_remainder<span style="color:#006600; font-weight:bold;">&#40;</span>text, len<span style="color:#006600; font-weight:bold;">&#41;</span>
  chars = text.<span style="color:#9900CC;">mb_chars</span> <span style="color:#008000; font-style:italic;">#converts string to char</span>
  l = chars.<span style="color:#9900CC;">length</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> l <span style="color:#006600; font-weight:bold;">&lt;</span> len <span style="color:#008000; font-style:italic;">#if text does not need truncated</span>
    <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#996600;">&quot;&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span>chars<span style="color:#006600; font-weight:bold;">&#91;</span>len<span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#996600;">' '</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#make sure the break doesn't happen in the middle of a word</span>
    len = len<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  trunc_text = <span style="color:#006600; font-weight:bold;">&#40;</span>chars.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&gt;</span> len ? chars<span style="color:#006600; font-weight:bold;">&#91;</span>len...<span style="color:#9900CC;">l</span><span style="color:#006600; font-weight:bold;">&#93;</span> : text<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">to_s</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p dir="ltr">Now that I&#8217;m a little wiser, I could have done it like this. (I haven&#8217;t actually tested this code so caveat emptor.)</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#0066ff; font-weight:bold;">@contracted_description</span> = truncate<span style="color:#006600; font-weight:bold;">&#40;</span>@location.<span style="color:#9900CC;">description</span>, <span style="color:#ff3333; font-weight:bold;">:length</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">100</span>, <span style="color:#ff3333; font-weight:bold;">:separator</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">' '</span>, <span style="color:#ff3333; font-weight:bold;">:omission</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#0066ff; font-weight:bold;">@remaining_description</span> = <span style="color:#0066ff; font-weight:bold;">@location</span>.<span style="color:#9900CC;">description</span>.<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:#008000; font-style:italic;">#{@contracted_description}(.*)/m, '\1')</span></pre></div></div>

<p dir="ltr">Basically what going on here is I pass these functions some text and the amount of characters I want to show up in the teaser text. The first one returns my teaser text, the second returns the remainder text to be toggled on or off, and both of them will “back up” in the text provided to find the first white space to ensure we don’t break off the teaser text in the middle of a word.</p>
<p dir="ltr">Ok, we have our two pieces of text, now to display them. This site already was using scriptaculous effects in the menu to toggle nested menus, so we stuck with that. Assuming you have the scriptaculous library in your app, our view looks something like:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id = &quot;contracted_description&quot; &gt;
	&lt;%= @contracted_description %&gt;
	&lt;div id = &quot;full_description&quot; style = &quot;display:none;&quot;&gt;
		&lt;%= @remaining_description %&gt;
		&lt;%= link_to_function(&quot;Less Text&quot;,&quot;toggleDescription()&quot;, :id =&gt;&quot;less_link&quot;) %&gt;
	&lt;/div&gt;
	&lt;% unless @remaining_description.length == 0%&gt;
		&lt;%= link_to_function(&quot;...More Text&quot;,&quot;toggleDescription()&quot;, :id =&gt;&quot;more_link&quot;) %&gt;
	&lt;% end %&gt;
&lt;/div&gt;</pre></div></div>

<p dir="ltr">Or if you prefer slim:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">div id = &quot;contracted_description&quot;
        = @contracted_description
	div id = &quot;full_description&quot; style = &quot;display:none;&quot;
		= @remaining_description
		= link_to_function(&quot;Less Text&quot;,&quot;toggleDescription()&quot;, :id =&gt;&quot;less_link&quot;)
	-unless @remaining_description.length == 0
		= link_to_function(&quot;...More Text&quot;,&quot;toggleDescription()&quot;, :id =&gt;&quot;more_link&quot;)</pre></div></div>

<p dir="ltr">And our toggleDescription() javascript function looks something like:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> toggleDescription<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	Effect.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;full_description&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'blind'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>duration<span style="color: #339933;">:</span><span style="color: #CC0000;">0.50</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	Effect.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;more_link&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'appear'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p dir="ltr">Now we have text that expands and contracts. It’s not seamless yet, but where almost there. As for our “Less Text” and “More Text” links, you could easily make them the same link, and change the text rather than have two different ones.</p>
<p dir="ltr">All that’s left is to make it all display like seamless text when expanded, rather than text separated by two divs. The text I was pulling from the database was already formatted with paragraphs that I wanted to preserve, so I used psuedo elements to display:inline the last element of type paragraph in the contracted text, as well as the first element of type paragraph in the remaining full description text. So our stylesheet looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#contracted_description</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#contracted_description</span> <span style="color: #00AA00;">&gt;</span> p<span style="color: #3333ff;">:last-of-type</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;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#full_description</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;">inline</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#full_description</span> p<span style="color: #3333ff;">:first-child</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;">inline</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#full_description</span> p<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</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: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#more_link</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;">inline</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#less_link</span><span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/iphone-development/how-to-toggling-text-with-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVP is not an excuse to make shitty software</title>
		<link>http://blog.12spokes.com/web-design-development/mvp-is-not-an-excuse-to-make-shitty-software/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mvp-is-not-an-excuse-to-make-shitty-software</link>
		<comments>http://blog.12spokes.com/web-design-development/mvp-is-not-an-excuse-to-make-shitty-software/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 22:59:05 +0000</pubDate>
		<dc:creator>Trey</dc:creator>
				<category><![CDATA[Agile development]]></category>
		<category><![CDATA[MVPs]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=746</guid>
		<description><![CDATA[We work with a lot of startups—companies who are anxious to get their great idea built and delivered to the world. One of the biggest challenges startup entrepreneurs face is figuring out exactly what to build and when. Startups don&#8217;t have endless capital, like larger corporations, and they can&#8217;t explore every idea or build their [...]]]></description>
			<content:encoded><![CDATA[<p>We work with a lot of startups—companies who are anxious to get their great idea built and delivered to the world. One of the biggest challenges startup entrepreneurs face is figuring out exactly what to build and when. Startups don&#8217;t have endless capital, like larger corporations, and they can&#8217;t explore every idea or build their complete vision into version 1. No, the startup entrepreneur has to take this dream she&#8217;s been dreaming and immediately pare it down to be in line with her bankroll.</p>
<p>This is hard. Really hard. And it seems like more often than not, it doesn&#8217;t happen the right way. You can pare down your app by delivering 100% of your feature set, shittily, or you can pare down your app by delivering 50% of your feature set, really really well.</p>
<p>My concern is that in our industry, a lot of people feel that doing things the right way just doesn&#8217;t matter as much when you&#8217;re building a Minimum Viable Product (MVP). I&#8217;ve heard too many people excuse the sad state of a feature because &#8220;it&#8217;s good enough for an MVP&#8221;. We&#8217;re putting too much focus on the &#8216;M&#8217; and not enough of the &#8216;V&#8217;.</p>
<p>If you&#8217;re an established company with millions of users, you can afford to put out a new feature that&#8217;s only 80% complete. You&#8217;ve already got those users. They&#8217;re not likely to up and leave your service just because this new feature doesn&#8217;t work as smoothly as it should. If you&#8217;re a brand new company that doesn&#8217;t have any public trust, though, the second a user starts to hit the smallest barrier, she&#8217;ll up and leave your app faster than you can say &#8220;command-w&#8221;.</p>
<p>Don&#8217;t get me wrong,we&#8217;re huge proponents of agile and lean, but, to us, that doesn&#8217;t mean cutting out quality! Instead, we work with our clients to identify the minimum feature-set required to deliver on the core value the application is to provide and then, <a href="http://www.12spokes.com/our-process">using our proven process</a>, we develop those features until they&#8217;re perfect.</p>
<p>Would it be nicer to have feature X? Sure, but if it isn&#8217;t required to perform the core value, it&#8217;s off the list. That&#8217;s what future iterations are for.</p>
<p>As developers, I think it&#8217;s our duty to our clients and our industry to help entrepreneurs choose about which features are key and which ones can wait. This means pushing back and saying &#8220;no&#8221; sometimes. And once we&#8217;ve helped them make those difficult choices, then it&#8217;s our job to build the hell out of the remaining features to give our clients the best chance at breaking into their niches. If we can all agree to spend as much as the &#8216;V&#8217; as on the &#8216;M&#8217;, magic can and will happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/web-design-development/mvp-is-not-an-excuse-to-make-shitty-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What happened when I traded my computer for an iPad</title>
		<link>http://blog.12spokes.com/web-design-development/what-happened-when-i-traded-my-computer-for-an-ipad/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-happened-when-i-traded-my-computer-for-an-ipad</link>
		<comments>http://blog.12spokes.com/web-design-development/what-happened-when-i-traded-my-computer-for-an-ipad/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 23:11:03 +0000</pubDate>
		<dc:creator>Erin</dc:creator>
				<category><![CDATA[Dreary business details]]></category>
		<category><![CDATA[Mobile and tablet]]></category>
		<category><![CDATA[Running a business]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=635</guid>
		<description><![CDATA[Backstory: One of our developers had his computer crash, and he needed a new one ASAP. We decided to send him my brawny Macbook Pro, because its power was sadly underused. I don&#8217;t do any heavy lifting—like coding or Photoshop—anymore; my job these days mainly consists of composing emails and managing HR. I didn&#8217;t need [...]]]></description>
			<content:encoded><![CDATA[<p>Backstory: One of our developers had his computer crash, and he needed a new one ASAP. We decided to send him my brawny Macbook Pro, because its power was sadly underused. I don&#8217;t do any heavy lifting—like coding or Photoshop—anymore; my job these days mainly consists of composing emails and managing HR. I didn&#8217;t need such a heavy-duty machine anymore, so we decided it was time for me to downgrade.</p>
<p>Hence, my laptop was shipped off to a better home in Florida, and I started a grand experiment: doing all my work on an iPad and my iPhone. I was excited to answer a question we&#8217;ve been floating around the office: Do you really need a computer anymore? What does the future of software look like? What will we be building in five years? Will it be desktop-oriented or will everything be an app? Will people even still be using desktop computers? Will corporate America replace its towers of gray CPUs with slim touch-screen tablets?</p>
<p>I have seen the future, and I&#8217;m telling you: those desktop computers are gonna be around for a while.</p>
<p>What I&#8217;m going to say next will surprise no one, but I have empirical evidence that it&#8217;s true: typing on the iPad is not good for business. That&#8217;s the first hurdle to a touch screen-based workplace. I don&#8217;t care how responsive and awesome that screen is; Mavis Beacon taught me to type with a real keyboard, and that&#8217;s where I can get stuff done. I&#8217;m pretty sure we&#8217;d would lose an automatic 30% in productivity if we all had to switch to touch screens for day-to-day business. (Yes, there are bluetooth keyboards for tablets, but if you&#8217;re going to buy a keyboard, where&#8217;s the point in using a tablet?)</p>
<p>The other hurdle, again, perhaps unsurprising, was the lack of tablet support by conventional desktop applications. For example, Intuit Payroll has a tablet app, but it&#8217;s a watered-down version of the desktop application, and there&#8217;s no way to opt out of the tablet version. (My partner Trey suggests that&#8217;s because the desktop version relies heavily on functionality that doesn&#8217;t work in tablet form—like hovers—and in the next breath he points out that shouldn&#8217;t be an insurmountable obstacle to a good mobile browsing experience). I&#8217;ve been waiting for years for Intuit to release a Mac-based Turbotax for business; since I&#8217;ve yet to see that, I have little faith in that behemoth&#8217;s ability to adapt to mobile devices. Intuit isn&#8217;t the only company guilty of this, I&#8217;m sure.</p>
<p>So there you have it. If you don&#8217;t need to type a lot and you don&#8217;t rely on slow-moving enterprise software for your day-to-day job, then yeah, maybe you&#8217;ll be working on a tablet in five years.</p>
<p>As for me, I am going to work happily with my tiny new Macbook, knowing that the world is going to need online software developers (and companies like mine) for a long time to come. It might not always be Ruby and Rails that we&#8217;re writing, but whatever it is, I know we&#8217;re going to continue to be awesome at it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/web-design-development/what-happened-when-i-traded-my-computer-for-an-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refusing treatment for a slight case of DIVitis</title>
		<link>http://blog.12spokes.com/web-design-development/refusing-treatment-for-a-slight-case-of-divitis/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=refusing-treatment-for-a-slight-case-of-divitis</link>
		<comments>http://blog.12spokes.com/web-design-development/refusing-treatment-for-a-slight-case-of-divitis/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 22:09:55 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=665</guid>
		<description><![CDATA[The best thing I came across about CSS in 2011 was Nicole Sullivan’s Webstock presentation, Our Best Practices Are Killing Us. Reading the slides, I had one of those cool experiences characterized by repetitive head nodding and smiling, where you realize that someone is perfectly articulating a thought that’s only half formed in your own [...]]]></description>
			<content:encoded><![CDATA[<p>The best thing I came across about CSS in 2011 was Nicole Sullivan’s Webstock presentation, <a title="Our Best Practices Are Killing Us" href="http://www.stubbornella.org/content/2011/04/28/our-best-practices-are-killing-us/" target="_blank">Our Best Practices Are Killing Us</a>. Reading the slides, I had one of those cool experiences characterized by repetitive head nodding and smiling, where you realize that someone is perfectly articulating a thought that’s only half formed in your own head. And the thought in question was this: Our noble pursuit of the leanest possible markup is making our jobs harder and our work less maintainable. In short, we’re making our content modules work way too hard because we feel bad about adding markup (divs in particular) as a hook for presentation.</p>
<p>To illustrate what she means, here’s a scenario I feel like I come across all the time: The client wants any paragraphs mentioning their new videos to have a special video icon on the left hand side and a light blue background and rounded corners. You check the markup, and make a decision to add a .video-content class to your stylesheet. Something like&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">.video-<span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span> <span style="color: #933;">15px</span> <span style="color: #933;">15px</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">/cool-video-icon.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #933;">2%</span> <span style="color: #933;">50%</span> <span style="color: #cc00cc;">#e3f8fe</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>You then apply this class to any paragraphs that talk about your client’s videos, and you feel pretty good about it. The client’s happy and you imagine a web standards guru like Eric Meyer would be happy, too, if he were only watching you work. His blue eyes would twinkle, perhaps, as he slipped you a complimentary pass to his next speaking engagement in Honolulu.</p>
<div id="attachment_670" class="wp-caption aligncenter" style="width: 571px"><a href="http://blog.12spokes.com/web-design-development/refusing-treatment-for-a-slight-case-of-divitis/attachment/blog1/" rel="attachment wp-att-670"><img class="size-full wp-image-670" title=".video-content class on a paragraph" src="http://blog.12spokes.com/wp-content/uploads/2012/01/blog1.png" alt=".video-content class on a paragraph" width="561" height="174" /></a><p class="wp-caption-text">Your new .video-content class applied to a paragraph</p></div>
<p>Then, the rub. The client comes back a month later, complaining that the video content just isn’t standing out enough. He or she would like a heading to be grouped in with any video content that says, “Check out our video!” So now, your previous solution doesn’t work anymore. Still trying to win the imaginary approval of Mr. Meyer, you sigh quietly, and create a new class for the &lt;h2&gt; called .video-heading. To this class, you assign the same light blue background and the two rounded corners that top the section. Bit of a pain, but no big deal, really. Just another day for a front-end developer who truly cares about web standards.</p>
<div id="attachment_719" class="wp-caption aligncenter" style="width: 550px"><img src="http://blog.12spokes.com/wp-content/uploads/2012/01/blog21.png" alt="" title="blog2" width="540" height="209" class="size-full wp-image-719" /><p class="wp-caption-text">Your new markup - the heading takes the styles for the top rounded corners</p></div>
<p>However, a week passes, and the client still isn’t getting enough video views. The CEO feels that the paragraphs describing the videos are too long, so a request comes in to split them up into lots of little paragraphs. “Sure!”, you say. So you make the change to the markup, and&#8230;</p>
<p><a href="http://blog.12spokes.com/web-design-development/refusing-treatment-for-a-slight-case-of-divitis/attachment/blog3/" rel="attachment wp-att-676"><img class="aligncenter size-full wp-image-676" title="Markup trouble" src="http://blog.12spokes.com/wp-content/uploads/2012/01/blog3.png" alt="Markup trouble" width="540" height="348" /></a></p>
<p>So you probably see where I’m going here. At this point, if you have any sense, you break down and add that stupid DIV you’ve gone out of your way to avoid in your quest to be pure in your separation of content and presentation: Nicole’s point (if I understand it correctly) is that <strong>equally important is the separation of “tasks” within your CSS, even if it means adding a little extra markup to keep things maintainable</strong>.</p>
<p>Right now, I’m working on a really fun site/app here at 12 Spokes. It’s a reading/content-centric kind of thing I can really see people using on a tablet on the couch at night, so I decided to be trendy and make the front-end 100% responsive to the width of the device—whether you’re on a smartphone, a Galaxy, an iPad, or whatever, the layout should adapt to fit your screen. However, in laying out the basic grid using percentages, I came across a couple of cases where differences in the way browsers round percentages were breaking my layout when I added padding to the grid columns. I’m not a huge math fan, so working with declarations like “padding: 3.00084%” was making my little designer brain hurt.</p>
<p>So I took a deep breath, tried not to think of Eric Meyer, and added a little div to my grid inside each layout column. I called this div .pad-box, and yes, <strong>all it does is add padding</strong> to any element that might need it. That’s it. My 2008-era semantic web standards self would probably hang himself on his An Event Apart lanyard if he could see this, but thanks to Ms. Sullivan, I don’t care. Yes, it’s extra markup, but it’s bulletproof, repeatable, and has the pleasing effect of making the grid’s padding uniform across the app. If I want to space things out a little, all I have to do is adjust that div’s padding from, say, 10px to 15px.</p>
<p>I was a Philosophy major. And because a full-time, entry-level philosopher position with decent benefits STILL hasn’t opened up over the past 10 years, I’ve ended up a web designer. I can’t complain, but sometimes I feel a little sad how little philosophy I remember from my college days. One thing I do remember, though, was that I liked Aristotle because his writing seemed practical and actually applicable to my modern life—in particular, <a href="http://en.wikipedia.org/wiki/Golden_mean_%28philosophy%29">the idea of moderation, not excess in either direction, being a key to happiness</a>. So it is, perhaps, with presentational markup. A lot of DIVitis will kill your CSS, but a little might just make it stronger.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/web-design-development/refusing-treatment-for-a-slight-case-of-divitis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tools for Testing your Javascript</title>
		<link>http://blog.12spokes.com/web-design-development/tools-for-testing-your-javascript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tools-for-testing-your-javascript</link>
		<comments>http://blog.12spokes.com/web-design-development/tools-for-testing-your-javascript/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 20:31:13 +0000</pubDate>
		<dc:creator>Ethan</dc:creator>
				<category><![CDATA[Agile development]]></category>
		<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[In the Field]]></category>
		<category><![CDATA[Jasmine]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=619</guid>
		<description><![CDATA[In our team&#8217;s testing process (and we do have a significant process to make sure that everything gets covered), we&#8217;ve noted in the past that we have quite a bit of overlap between what&#8217;s covered by our Javascript unit tests (typically with Jasmine) and by our browser-driving acceptance tests (Cucumber and Capybara with Selenium-Webdriver). Because [...]]]></description>
			<content:encoded><![CDATA[<p>In our team&#8217;s testing process (and we do have a significant process to make sure that everything gets covered), we&#8217;ve noted in the past that we have quite a bit of overlap between what&#8217;s covered by our Javascript unit tests (typically with Jasmine) and by our browser-driving acceptance tests (Cucumber and Capybara with Selenium-Webdriver). Because we don&#8217;t want to duplicate our testing work if we don&#8217;t have to, we&#8217;ve had several conversations on to the theme of &#8220;When does it make sense to use Cucumber and when does it make sense to use Jasmine&#8221;.</p>
<p>Jasmine, if you haven&#8217;t used it, is a way to test your functionality in the same environment and at the same level as your javascript code. Much like when we&#8217;re working on the server-side, the test and the code share syntax and vocabulary (and running the resultant tests is very fast). The downside? Much of the time the javascript in our applications is working very closely with text and elements in the DOM of the web page that it&#8217;s included in. It could be argued that maybe this shouldn&#8217;t be the case, but if your use case is something like, &#8220;when I click this link, I want a modal dialog box to show up&#8221;, how far should the code really be abstracted away from the DOM that it&#8217;s working with? Because of this close relationship, jasmine tests often need to have a mocked DOM created and included that replicates the html we&#8217;d find coming from the application server, and this means keeping them in sync in order to preserve the usefulness of these tests (there is much to be said on HOW you can do this, but that is probably outside the scope of this post).</p>
<p>Cucumber, on the other hand, is the Golden Hammer of web application testing. It runs the whole stack, database to front-end javascript, so your front-end code is being tested in the exact environment that it runs in, including full interaction with your server code in it&#8217;s current state. A scenario will, in one fell swoop, log in to the site, load page, start clicking on things, and confirm that the visible results of your actions occur as you intend them to. Of course, as a result of this kitchen sink approach (which is necessary for full integration testing), the time it takes to run large suites of tests is not exactly low. 13 difference scenarios for testing different nuances of javascript-y interaction with a simple form can easily consume 30 seconds or more on each test run. Multiply that over every part of your application and you can be waiting a long time to make sure everything is still working.</p>
<p>During our latest team retrospective, in order to strike a balance, we&#8217;ve settled on a policy that I think leverages the strengths of each tool in order to reach a relative best-case scenario. Our core value is this: speed is critical because fast tests get run. Tests that run slowly just don&#8217;t get executed as often during the development cycle, and this quickly hurts their value to us. Because of this, we use jasmine for all of our front-end javascript. Just like our ruby code, nothing should be written without a unit test to cover it. In order to mitigate the issue with having HTML that accurately represents what&#8217;s being delivered by the server, we have a clever way of generating these fixtures of static html from the current server-side code base just prior to running the tests. Cucumber is in the mix, but only for what it was designed to be anyway: for integration and acceptance testing. Our cucumber scenarios (which, when done correctly, should be somewhat fewer in number than our unit tests) provide assurance that our main requirements from the customers are met and that all the elements of the application are working together successfully; meticulously executing every line of browser-based javascript is simply beyond the scope of such a tool.</p>
<p>As with all development tools, these things only have value to us insofar as they help us provide value to our customers. With our new strategy in place, I like to think that&#8217;s exactly what we&#8217;re accomplishing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/web-design-development/tools-for-testing-your-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Console and Git for Beginners (pt 1)</title>
		<link>http://blog.12spokes.com/web-design-development/console-and-git-for-beginners-pt-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=console-and-git-for-beginners-pt-1</link>
		<comments>http://blog.12spokes.com/web-design-development/console-and-git-for-beginners-pt-1/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 21:44:44 +0000</pubDate>
		<dc:creator>Colleen</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[In the Field]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=572</guid>
		<description><![CDATA[As a designer who uses Git and Terminal on a regular basis, it pains me to talk to other front-end web developers that aren&#8217;t even aware such wonderful things exist. I could go into the many ways that Git has helped me become a better coder and designer, not to mention how many times it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.12spokes.com/web-design-development/console-and-git-for-beginners-pt-1/attachment/git_terminal_header/" rel="attachment wp-att-651"><img class="alignnone size-full wp-image-651" title="git_terminal_header" src="http://blog.12spokes.com/wp-content/uploads/2012/01/git_terminal_header3.png" alt="" width="660" height="200" /></a></p>
<p>As a designer who uses <a href="http://git-scm.com/" target="_blank">Git</a> and <a href="http://en.wikipedia.org/wiki/Terminal_emulator" target="_blank">Terminal</a> on a regular basis, it pains me to talk to other front-end web developers that aren&#8217;t even aware such wonderful things exist. I could go into the many ways that Git has helped me become a better coder and designer, not to mention how many times it&#8217;s saved my ass. As far as I&#8217;m concerned it&#8217;s <em>the</em> best version control out there right now and more designers need to get on board using it.</p>
<h2 class="no-title">GUI vs Console</h2>
<p>There are plenty of apps and plugins out there for Git. These are great for learning and for looking at diffs that come up, seeing what&#8217;s in the queue to be committed, etc. Let&#8217;s face it though—you&#8217;re not going to be a killer web designer if you use a wysiwyg for all of your coding, just as you will not be a pro with Git unless you use a terminal or console to work with it.</p>
<h2 class="no-title">What is Terminal?</h2>
<p>&#8220;A terminal window allows the user access to a text terminal and all its applications such as <a title="Command line interface" href="http://en.wikipedia.org/wiki/Command_line_interface">command line interfaces</a> (CLI) and <a title="Text user interface" href="http://en.wikipedia.org/wiki/Text_user_interface">text user interface</a> applications.&#8221;<sup>1</sup> How it relates to your Git repositories is that it becomes the hub of your project. You&#8217;ll be running everything locally through it. For example, I&#8217;ll usually have a tab open for Git, a tab for running the project, a tab for Sass, a tab for Coffeescript, etc. etc.</p>
<p>Most operating systems already come with a default terminal application. I&#8217;m on a Mac so I just use &#8220;Terminal&#8221; but if you&#8217;re on something different here&#8217;s <a href="http://en.wikipedia.org/wiki/List_of_terminal_emulators" target="_blank">a big ol&#8217; long list </a>of terminal applications you can peruse through.</p>
<h2 class="no-title">Terminal Basics</h2>
<p>Let&#8217;s just get down a few basic commands in Terminal that will help you out when you&#8217;re using Git.</p>
<p>First off, it helps to know where you are right now. Whenever you&#8217;re in the terminal, you are currently in a directory somewhere on your computer.  To see which directory it is, just type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">pwd</span></pre></div></div>

<p>Good start!  Now, to CHANGE where you are, you can use the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>some directory<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">cd</span> websites<span style="color: #000000; font-weight: bold;">/</span>new_project</pre></div></div>

<p>But, this only lets you go deeper into the directory structure.  If you want to back out of the directory that you&#8217;re in, you can use this to move up to the current directory&#8217;s parent:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre></div></div>

<p>In order to see what&#8217;s available in the current directory you&#8217;re in, you can use this command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">ls</span></pre></div></div>

<h3 class="no-title">Running Processes</h3>
<p>Depending on what your project is built on, you can use Terminal to start your projects and keeping them running in the background. At 12 Spokes we concentrate on projects built with Ruby on Rails, so a lot of times I&#8217;ll open up a tab, navigate with &#8220;cd&#8221; to the project I&#8217;m working on, and then run&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> rails s</pre></div></div>

<p>&#8230; to start the server for that app.</p>
<p>This idea carries through to libraries like Sass that involve having processes running that perform updates or other actions whenever you make a change. So if I&#8217;m using sass or scss on a project all I have to do is open up a tab in Terminal and type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> sass <span style="color: #660033;">--watch</span> <span style="color: #000000; font-weight: bold;">/</span>scss_folder_path:<span style="color: #000000; font-weight: bold;">/</span>css_folder_path</pre></div></div>

<p>And then sass will sit and wait for me to make changes, compiling them into normal css files as I go.  Now, this is just the bare minimum line to get sass working. It comes with a lot of options built in for how you wish your css to output so I definitely recommend going and taking a look over at the <a href="http://sass-lang.com/" target="_blank">documentation</a>.</p>
<h2 class="no-title">Git &amp; Github</h2>
<h3>Why Use Git?</h3>
<p>Here&#8217;s a list of just /some/ of the reasons to use Git:</p>
<ul class="generic">
<li>Keep track of changes</li>
<li>Roll back to previous versions/commits of your site (VERY IMPORTANT)</li>
<li>Easy collaboration with more people</li>
<li>Again, Version Control (HUGE WIN)</li>
</ul>
<h3>Git-ing Down to Business</h3>
<p>Now that we have some basic console knowledge down, let&#8217;s start doing some Git stuff.</p>
<p>Note: I&#8217;m going to assume you have Git installed on your computer. If you don&#8217;t, check out the <a href="http://git-scm.com/" target="_blank">Git</a> page for information on installing Git.</p>
<p>At 12 Spokes, we use Git version control on all of our projects and <a href="https://github.com/" target="_blank">GitHub</a> for all of our project collaboration. If you don&#8217;t use GitHub, I highly recommend it. I&#8217;ll be basing a lot of this tutorial around it (though it&#8217;s not absolutely needed). If you don&#8217;t know what it is, go check it out (no pun intended).</p>
<h3>Cloning a Repo</h3>
<p>A repository (or &#8216;repo&#8217;) is where all of your project is stored. So to get started, let&#8217;s clone a repo from GitHub.</p>
<ul class="generic">
<ul class="generic">
<li>First, get to the folder on your local machine where you want to keep all of your projects

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>Projects</pre></div></div>

</li>
<li>Once there, we want to go to GitHub and copy the path to our git repo, which should look something like this:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>github.com:12spokes<span style="color: #000000; font-weight: bold;">/</span>tandem.git</pre></div></div>

</li>
<li>Back in Terminal, type in:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>github.com:12spokes<span style="color: #000000; font-weight: bold;">/</span>tandem.git</pre></div></div>

</li>
<li>Complete! You should see it create the folder for your new repo and download all the stuff that&#8217;s inside it. Congrats—you now have a git repo of your very own!</li>
</ul>
</ul>
<p>(PS: if you don&#8217;t have any repos that you can clone down to your machine, you can just create a new one for yourself by going to the directory where you want it to exist and typing:</p>
<pre> git init</pre>
<p>and then you&#8217;re ready to start making changes!)</p>
<h3>Commits</h3>
<p>Just like other version control systems, Git is built upon the idea that you make changes and then commit those changes. Think of a commit as a type of milestone or a marker; it&#8217;s a collection of file changes, additions, and deletions that you&#8217;ve decided to group together because they&#8217;re all focused on the same thing. We use these commits not only to see what&#8217;s been done, but also as points to roll back on. For example, if we&#8217;re working on a site and commit some new changes but realize that something isn&#8217;t working we can roll back the website to the previous commit when things <em>were</em> working. Get it? Good. Now let&#8217;s do it.</p>
<ul class="generic">
<ul class="generic">
<ol>
<li>Get to the repo you want to work with

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>repo</pre></div></div>

</li>
<li>Open up your project in a text editor and make some changes. Save those.</li>
<li>Go back to Terminal and type in:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">git</span> status</pre></div></div>

<p>You should see those files that you changed listed</li>
<li>Right now they&#8217;re on an &#8216;unstaging&#8217; side of Git. One of the best things about commits is that you can choose what you want to commit, so you can logically group things together that are related to one another. For the sake of the tutorial we&#8217;re going to go with everything though. So we want to:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">git</span> add <span style="color: #660033;">-A</span></pre></div></div>

<p>This will &#8216;add&#8217; all of those changes to staging, and make them ready to commit.</li>
<li>To commit, type in:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">git</span> commit</pre></div></div>

<p>&#8230; to just commit everything, OR (preferably)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">'This is a message saying what I changed'</span></pre></div></div>

<p>&#8230; add &#8216;- m&#8217; to the end of it to add on a message describing what you did in that commit. I HIGHLY recommend adding a message, because if you leave this project for a while and come back and need to find something you&#8217;re going to be very grateful for those notes.</li>
<li>You&#8217;re done! Congrats! You made your first Git commit.</li>
</ol>
</ul>
</ul>
<h3>Push-me Pull-you</h3>
<p>If you&#8217;re using something such as GitHub to store your git project outside of your local machine you&#8217;re going to want to get friendly with pushing and pulling.</p>
<p>It&#8217;s good practice to pull down any changes from the remote repo first (say, for instance, if more than one person is working on the project). Pulling both gets the changes from the remote repository and then merges them with the copy of the repo on your local machine. To do this (get to your project directory) and type:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">git</span> pull</pre></div></div>

<p>Now that we&#8217;re up to date, let&#8217;s say we&#8217;ve made changes, committed those changes and are ready to push back up. It&#8217;s as easy as&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">git</span> push</pre></div></div>

<p>This will push any commits that you&#8217;ve completed.</p>
<h2 class="no-title">Conclusion (for now)</h2>
<p>That&#8217;s it! You&#8217;ve tackled your first Git project! It wasn&#8217;t as hard as you thought it would be, huh?</p>
<p>If you&#8217;re ready for more, stay tuned for Part 2 of the article where we get more in depth with more awesome Git abilities; such as, Forking and Branching and Stashing!! Oh my!</p>
<h2 class="protips no-title">Protips:</h2>
<ul class="generic">
<ul class="generic">
<li>On a mac you can drag and drop a folder you want to use after typing in &#8216;cd&#8217;</li>
<li>Soon as you start typing the name of a folder you can quickly finish out the name by pressing &#8216;tab&#8217;</li>
<li>Commit frequently! If you find you&#8217;re at a good stopping point it&#8217;s a good habit to commit those changes.</li>
<li>Sometimes it might be nice to look at what changes were made in your commits or before you commit. GitX has a nice interface for seeing these differences.</li>
</ul>
</ul>
<p style="font-size: 11px; padding-top: 20px;"><sup>1</sup> <a style="font-size: 11px;" href="http://en.wikipedia.org/wiki/Terminal_emulator"> http://en.wikipedia.org/wiki/Terminal_emulator</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/web-design-development/console-and-git-for-beginners-pt-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;If you work from home, how do you prove you&#8217;re actually working?&#8221;</title>
		<link>http://blog.12spokes.com/running-a-business/if-you-work-from-home-how-do-you-prove-youre-actually-working/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-you-work-from-home-how-do-you-prove-youre-actually-working</link>
		<comments>http://blog.12spokes.com/running-a-business/if-you-work-from-home-how-do-you-prove-youre-actually-working/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 22:40:31 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Distributed teams]]></category>
		<category><![CDATA[Dreary business details]]></category>
		<category><![CDATA[Running a business]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=556</guid>
		<description><![CDATA[I get this question all the time, especially when I go home for the holidays. It&#8217;s a valid question, I suppose. When you work in an office, that&#8217;s your default way to know the other people on your team are working. [Ed. Note: it's sad that people think their physical presence in an office proves [...]]]></description>
			<content:encoded><![CDATA[<p>I get this question all the time, especially when I go home for the holidays. It&#8217;s a valid question, I suppose. When you work in an office, that&#8217;s your default way to know the other people on your team are working. [Ed. Note: it's sad that people think their physical presence in an office proves anything other than that they're present.]
<p>Still, it kind of baffles me, because no matter what you do, don&#8217;t you have to make your presence known by consistently generating value?</p>
<p>Imagine I&#8217;m a mechanic. Someone brings their car in for repairs and then gets a ride to work for the day. I&#8217;m my own boss, so I have no supervision. Since I&#8217;m especially crafty, I figure out that I have the perfect scam&#8211;I can charge for my time without actually doing any work! The customer comes back later to pick up the car, I hand them the invoice, and the profit is all mine.</p>
<p>… except the car still won&#8217;t start.</p>
<p>A mechanic who actually wants to stay in business will assess the car, research replacement parts, provide an estimate to the customer, send someone to the store, perform the repair, verify that things are working properly, and create a detailed invoice.</p>
<p>The process is nearly identical for me. When I get assigned a new story, I need to gather requirements by talking with the client. I may also consult with my fellow team members and do some research to find solutions to similar problems. Then I give an estimate of its complexity, write the code and tests, and send the changes off for review by one of my teammates. Once everything is approved it&#8217;s sent to the client, and after a final approval it ends up on the production site. This cycle repeats itself daily, with every change being viewed and approved by someone on our team, the client, and ultimately the rest of the world.</p>
<p>Outside of our usual process, I need to make myself generally available for questions in our team chat room, e-mail, Skype meetings, and the occasional emergency. And yes, many of these things happen while sitting motionlessly on my couch next to my happy dog.</p>
<p>We also don&#8217;t just check in and check out; we are expected to log our time in detailed 15 minute increments. By the end of the day, between logging time for projects where I&#8217;m the primary or support developer and internal projects and meetings, I may have something like 20 entries for 5 different projects.</p>
<p>This remote working arrangement goes hand in hand with our shorter-and-less-soul-crushing-than-normal work weeks. I only log my time when I&#8217;m generating value. Each week I&#8217;m logging 30-35 hours of actual work, not just hours of being in an office. Sure, I&#8217;m able to sleep in more than most people and I don&#8217;t have a commute, but when you remove all of that overhead and can focus on accomplishing things, you&#8217;re able to work at peak efficiency.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/running-a-business/if-you-work-from-home-how-do-you-prove-youre-actually-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The ugly downsides of running a remote team</title>
		<link>http://blog.12spokes.com/running-a-business/the-ugly-downsides-of-running-a-remote-team/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-ugly-downsides-of-running-a-remote-team</link>
		<comments>http://blog.12spokes.com/running-a-business/the-ugly-downsides-of-running-a-remote-team/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 17:01:03 +0000</pubDate>
		<dc:creator>Erin</dc:creator>
				<category><![CDATA[Distributed teams]]></category>
		<category><![CDATA[Dreary business details]]></category>
		<category><![CDATA[Hiring]]></category>
		<category><![CDATA[Running a business]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=547</guid>
		<description><![CDATA[Don&#8217;t get me wrong. I love our remote team. I feel like we&#8217;ve put together an awesome group of the best talent we can find across the country. Everyone&#8217;s an awesome communicator, so getting the point across is just as easy when we&#8217;re 1,000 miles away as when we&#8217;re across the table from each other. [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t get me wrong. I love our remote team. I feel like we&#8217;ve put together an awesome group of the best talent we can find across the country. Everyone&#8217;s an awesome communicator, so getting the point across is just as easy when we&#8217;re 1,000 miles away as when we&#8217;re across the table from each other.</p>
<p>But as a business owner, I&#8217;ve learned there are some logistical hurdles to managing a remote team.</p>
<ol>
<li><strong>Health insurance</strong>. We have people in many, many different states. Some insurance companies will cover lots of states, provided you have a critical mass (i.e., 50% of your staff) in your home state. But who wants to be constrained like that? I don&#8217;t want to be presented with the option of an awesome developer in Montana or a mediocre one in Utah and have to choose the Utahn because it keeps our balance over 50%.We insure through United Health Care, because it was our only option for nationwide care. Fortunately, it&#8217;s a good plan that we can enjoy.</li>
<li><strong>State taxes and registration</strong>. This might seem like a no-brainer, but every time you bring on a new employee in a new state, that means you need to fill out that state&#8217;s specific tax forms. Some states are pretty simple, others are a pretty big pain in the butt. (DC, I&#8217;m looking at you). Some of them require that you fax in your forms, others have online forms that require Internet Explorer (WHO DOES THAT??). It&#8217;s a big mess.</li>
<li><strong>Payroll service fees</strong>. We use Intuit Payroll. For every new state we add an employee, we add an extra $9 to our monthly fee.</li>
</ol>
<p>The alternative to all of this is to hire a PEO (professional employer organization), a getup that becomes a &#8220;co-owner&#8221; of your company in charge of HR. You&#8217;ll circumvent all of these problems, but you&#8217;ll pay for it. The last quote I got was $155 per employee per month. Since these problems are mainly up-front issues (once you figure out your health insurance and register your business with the state, you&#8217;re mostly done), I don&#8217;t think it&#8217;s worth the additional monthly bill.</p>
<p>But I&#8217;m certainly motivated now to hire someone in Missouri, DC, Florida, Maine, Oregon or Utah.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/running-a-business/the-ugly-downsides-of-running-a-remote-team/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Four tips for an easier Canvas animation</title>
		<link>http://blog.12spokes.com/web-design-development/four-tips-for-an-easier-canvas-animation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=four-tips-for-an-easier-canvas-animation</link>
		<comments>http://blog.12spokes.com/web-design-development/four-tips-for-an-easier-canvas-animation/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 21:50:27 +0000</pubDate>
		<dc:creator>Ethan</dc:creator>
				<category><![CDATA[Canvas animation]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=529</guid>
		<description><![CDATA[What&#8217;s the most important thing about your company&#8217;s homepage? The gimmick, of course! Ok, maybe that&#8217;s not true. Maybe what&#8217;s really important is a pleasant design, professional message, and concise and accurate information—but a gimmick doesn&#8217;t hurt! We&#8217;re almost finished redesigning OUR web presence, and in addition to all those important pieces of a good website, we [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the most important thing about your company&#8217;s homepage? The gimmick, of course! Ok, maybe that&#8217;s not true. Maybe what&#8217;s really important is a pleasant design, professional message, and concise and accurate information—but a gimmick doesn&#8217;t hurt! We&#8217;re almost finished redesigning OUR web presence, and in addition to all those important pieces of a good website, we wanted to have something special that really demonstrates our technical prowess. Here&#8217;s what we came up with.</p>
<p>We want to show that putting in the effort to do things right the first time makes a big difference, and that&#8217;s what we&#8217;re about. There&#8217;s a big difference between teams who do things the &#8220;right way&#8221; and teams that build things &#8220;good enough for now&#8221;. Here&#8217;s how we represent this idea graphically:</p>
<p><a href="http://blog.12spokes.com/web-design-development/four-tips-for-an-easier-canvas-animation/attachment/screen-shot-2011-12-08-at-2-11-46-pm/" rel="attachment wp-att-534"><img class="alignleft size-large wp-image-534" title="Screen Shot 2011-12-08 at 2.11.46 PM" src="http://blog.12spokes.com/wp-content/uploads/2011/12/Screen-Shot-2011-12-08-at-2.11.46-PM-1024x567.png" alt="" width="580" height="321" /></a></p>
<p>&nbsp;</p>
<p>Two paths lie before our imaginary biker: a challenging uphill gauntlet to the summit, and an easy ride around the base. The former represents the hard work and resultant rewards of good architecture, solid testing, and aggressive project management; the later is hacky duct-tape programming with no real QA process and minimal customer involvement.</p>
<p>As the bike climbs the mountain, the world gradually becomes more beautiful; flora blooms, the sun comes out, and vibrant colors coalesce into a portrait of the ideal day. But when the biker chooses the &#8220;easy&#8221; path, gloomy skies prevail, the clouds roll in, and storms arise on the horizon.</p>
<p>This was our vision, and with the help of the new canvas support in most modern browsers, we&#8217;ve made it something of a reality. What follows is the short list of recommendations I now feel qualified to give after the implementation of such a project. Heed these, and you too can have a spiffy bit of flair to make people sit up and notice you when they arrive at your digital home.</p>
<p><strong>1) Pick an animation library</strong></p>
<p>Of course, if you&#8217;re really hardcore, you could do all the animation yourself, from scratch, directly with the canvas API. I actually considered this at first; how hard could it be to specify coordinates on a 2-D plane and make images move to them in a coordinated manner? Well, it might not be HARD, but it can definitely be very tedious. Animation of any type requires somewhat repetitive tasks that are commonly reused, and an abstraction layer makes this go WAY faster. We used <a href="http://kangax.github.com/fabric.js/">fabric.js</a> for our little mountain-biking escapade, and it worked just fine, but after some additional exposure to other options, I think <a href="http://paperjs.org/">paper.js</a> would be what I would choose if I were to do it over. A lot of what took up most of my time was defining the path and various angles the bike would have to appear at frame-by-frame, and paper.js has some great path-simplifying functions that would have been quite helpful.</p>
<p><strong>2) Think in terms of what REALLY needs to be animated</strong></p>
<p>My first pass at making our little bike travel up the mountain involved 1 bike image and 4 background images (each one a landscape involving the mountain, the sky, clouds, and the various stopping points along the way). The idea was that each checkpoint on the way up the mountain would have the background looking greener and more alive, and the images would fade into one another as the bike traveled up the mountain path. I did this by putting the 4 background images on the canvas at the same location and gradually adjusting their opacity from one to the next as the bike moved. This worked, but involved a lot of calculations to step the fading along proportionally to the bike&#8217;s travel speed, and the performance on Chrome quickly degraded (the background was a large image, and adding 4 of them to the canvas took time).</p>
<p>We realized quickly that since the background wasn&#8217;t really being animated, just fading in and out, that putting it directly on the canvas wasn&#8217;t truly necessary.  We solved the performance issue by making the images smaller (jpg instead of png, and added some compression), and by placing them BEHIND the canvas and using jquery&#8217;s &#8220;fadeIn&#8221; and &#8220;fadeOut&#8221; methods to fade between them with little work on our part, leaving the actual canvas animation for the only really moving part of the scene (the bike).</p>
<p><strong>3) Work smart, not hard.</strong></p>
<p>The most tedious part of the whole process was moving the bike up the mountain. Since the mountainous terrain was a jagged path, the bike had to be moving at different angles, constantly changing direction and speed. At first I simply tried to do this frame by frame, specifying coordinates and adjusting them manually as necessary. This was very functional, but very tiring. Ultimately I realized that there was a simpler way. A straight line is easy to extrapolate all the coordinates along programmatically, so the trick we used was simply to break this complex path into multiple straight line segments. By manually positioning the image at the points where direction changed (maybe 5-8 points per path), we could use a script to divide the segment into a fixed number of frames between each point along a linear path (difference in x and difference in y). That saved my fingers a TON of typing.</p>
<p><strong>4) Test in multiple browsers</strong></p>
<p>All canvas implementations are not created equal.  What worked just fine in FF ended up running the bike behind the mountain in Safari and running in almost choppy slow motion in Chrome. This is really a given on any project anymore, but you have to do your dedicated browser testing before you release things into the wild (and yes, our bike rides well on the iPhone, too).</p>
<p>Long story short, a little animation (gimmicky as it may seem) can add quite a bit of personality to an otherwise mostly informational web presence. As easy as it is now to make this kind of magic happen, there&#8217;s no reason not to consider adding that additional special something to your next product.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/web-design-development/four-tips-for-an-easier-canvas-animation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User interface elements we hate: Episode 1</title>
		<link>http://blog.12spokes.com/web-design-development/user-interface-elements-we-hate-episode-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=user-interface-elements-we-hate-episode-1</link>
		<comments>http://blog.12spokes.com/web-design-development/user-interface-elements-we-hate-episode-1/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 21:32:45 +0000</pubDate>
		<dc:creator>Erin</dc:creator>
				<category><![CDATA[In the Field]]></category>
		<category><![CDATA[User Interface Elements We Hate]]></category>
		<category><![CDATA[Web Design & Development]]></category>

		<guid isPermaLink="false">http://blog.12spokes.com/?p=499</guid>
		<description><![CDATA[What it is: A form field for a phone number that&#8217;s broken up into three sections. &#160; Why I hate it: It&#8217;s fine when I know the phone number I&#8217;m entering. But if I&#8217;m entering a number I don&#8217;t know, I have to copy and paste it piecemeal rather than just plunking it in. More [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What it is:</strong> A form field for a phone number that&#8217;s broken up into three sections.</p>
<p><strong><a href="http://blog.12spokes.com/web-design-development/user-interface-elements-we-hate-episode-1/attachment/screen-shot-2011-12-06-at-2-13-53-pm/" rel="attachment wp-att-500"><img class="size-full wp-image-500 alignleft" title="Screen Shot 2011-12-06 at 2.13.53 PM" src="http://blog.12spokes.com/wp-content/uploads/2011/12/Screen-Shot-2011-12-06-at-2.13.53-PM.png" alt="" width="205" height="48" /></a></strong></p>
<p><strong><br />
</strong></p>
<p>&nbsp;</p>
<p><strong>Why I hate it: </strong>It&#8217;s fine when I know the phone number I&#8217;m entering. But if I&#8217;m entering a number I don&#8217;t know, I have to copy and paste it piecemeal rather than just plunking it in. More room for error.</p>
<p>Moreover, I think it represents laziness on the part of the developer. A developer looks at a phone field on a form and knows that people are going to enter their numbers in many different ways:</p>
<ul>
<li>(555) 555-5555</li>
<li>555-555-5555</li>
<li>5555555555</li>
</ul>
<p>All of the above are acceptable, but you&#8217;ve gotta write software that&#8217;s smart enough to know what is and isn&#8217;t a phone number. It takes a little more work. Breaking the field up into three boxes takes away some of that extra effort (and instead makes the user do the work).</p>
<p><strong>What I&#8217;d prefer:</strong> One big text field for my phone number. Duh.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.12spokes.com/web-design-development/user-interface-elements-we-hate-episode-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

