<?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>Brick By Brick from The Brick Factory</title>
	<atom:link href="http://blog.thebrickfactory.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thebrickfactory.com</link>
	<description>The Brick Factory Blog</description>
	<lastBuildDate>Thu, 09 May 2013 14:03:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Punk&#8217;d: The Interview</title>
		<link>http://blog.thebrickfactory.com/2013/05/punkd-the-interview/</link>
		<comments>http://blog.thebrickfactory.com/2013/05/punkd-the-interview/#comments</comments>
		<pubDate>Thu, 09 May 2013 14:00:47 +0000</pubDate>
		<dc:creator>Sierra Jacobson</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5536</guid>
		<description><![CDATA[Being a part of The Brick Factory team is quite a prestigious nod, it is a tough gig to get; I should know, I am the newest member of this wonderfully, technologically savvy crew. My journey to this desk came with its fair share of hurdles. One interview, two interviews, the days waiting for the [...]]]></description>
				<content:encoded><![CDATA[<p>Being a part of The Brick Factory team is quite a prestigious nod, it is a tough gig to get; I should know, I am the newest member of this wonderfully, technologically savvy crew. My journey to this desk came with its fair share of hurdles. One interview, two interviews, the days waiting for the call that I had been chosen, but in the end I not only received the position but also a warm welcome as I pulled up a chair to my new work station.</p>
<p>I have now been with The Brick Factory for about three months and believe I have made myself right at home. I have worked with <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy51c2FnYWluc3RhbHpoZWltZXJzLm9yZy8=">USAgainstAlzheimer&#8217;s</a>, <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5tZWxjcnVtLmNvbQ==">Melcrum,</a> <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5wYW50aGVyYS5vcmc=">Panthera</a>,  and <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5wb2Rlc3RhLmNvbQ==">Podesta</a>. I have truly enjoyed getting to know everyone at my office as well as the wonderful clients that work with The Brick Factory. I thought this might be a good time to make my full introduction.</p>
<p>My background in marketing, entrepreneurship and publishing, allows me to take a unique approach to managing a client’s digital strategies. With emphasis on campaign management, creative marketing techniques and on-point writing styles, I have an eye for tailoring a project to engage current readers, potential clients and prospective contributors to establish the proper intersection between the needs of the client and the follow-through of the audience.</p>
<p>I moved to DC following a nearly eight year stint in Nashville where I earned a B.B.A with a concentration in Entrepreneurship from Belmont University. In my spare time I enjoy writing, reading, and spending time with my wonderful husband and two rambunctious puppies.</p>
<p>While my experience getting to The Brick Factory was quite normal, a few interviews, a job offer, and a start date, the same cannot be said for the following young interviewees. Perhaps this is a new trend that I happened to luckily sneak out of, or maybe these are just some hiring managers with a twisted sense of humor, or lastly perhaps this is a true test of a potential hire’s character. Whatever the case might be, I am beyond thankful that the crew here at The Brick Factory did not put me through this torture – not yet anyway.</p>
<p>What do you think, could you get this job?</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/gT-Fb4-fzgI" frameborder="0"></iframe></p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5536" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/05/punkd-the-interview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer Internship at The Brick Factory</title>
		<link>http://blog.thebrickfactory.com/2013/04/summer-internship-at-the-brick-factory/</link>
		<comments>http://blog.thebrickfactory.com/2013/04/summer-internship-at-the-brick-factory/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 13:49:54 +0000</pubDate>
		<dc:creator>Sierra Jacobson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5727</guid>
		<description><![CDATA[We are looking for an intern to join our team for the summer. The job description is below as well as instructions for how to apply. We&#8217;d love to hear from you! Summer Internship at Brick Factory The Brick Factory plans and executes world-class digital campaigns for non-profits, trade associations, advocacy groups and brands. We [...]]]></description>
				<content:encoded><![CDATA[<p>We are looking for an intern to join our team for the summer. The job description is below as well as instructions for how to apply. We&#8217;d love to hear from you!</p>
<p><b>Summer Internship at Brick Factory</b></p>
<p>The Brick Factory plans and executes world-class digital campaigns for non-profits, trade associations, advocacy groups and brands. We believe in simple solutions, setting clear goals and objectives, and providing great service to our clients. We believe a good website or campaign is never done and the launch of a website is the beginning, not the end.</p>
<p>The Brick Factory intern will be responsible for supporting our Strategists in conception, implementation and analysis of many digital initiatives. This includes website, social media, email, mobile and other digital marketing efforts that support new business and client programs. This position calls for an individual with strong communication skills, analytic skills and creative thinking ability. This position requires a highly resourceful individual who can think on their feet and can focus under pressure.</p>
<p><b>What you can expect from this internship:</b></p>
<ul>
<li><b>To Work: </b>Do not be fooled, you will be put to work. Researching, creating, outlining, and executing strategic plans to the highest ability will be your average Monday.</li>
<li><b>To Grow: </b>The Brick Factory has high expectations of all interns and believes that in order for you to get the most of your time here, meeting and exceeding mutually defined goals is of top priority.</li>
<li><b>To Compete:</b> A summer internship at the Brick Factory will provide you will the skills and experience necessary to compete in the fast-paced, ever-changing digital technology industry.</li>
</ul>
<p><b>What we expect from you:</b></p>
<ul>
<li>You&#8217;re a fun person to be around.</li>
<li>You have a passion for work in the digital industry and are excited to explore the digital-sphere</li>
<li>You&#8217;re a problem solver. You would rather figure out the best solution than be told how to do it.</li>
<li>You&#8217;re organized. You can manage multiple projects at once and are dedicated to hitting deadlines.</li>
<li>You have some experience with HTML, marketing and sales research, and analytics tools.</li>
</ul>
<p><b>What you can expect from us:</b></p>
<ul>
<li>A great work environment, with plenty of opportunity to learn</li>
<li>A metro accessible office in downtown Washington, DC</li>
<li>Compensation during the extent of your internship</li>
<li>A fun team of enthusiastic and talented people</li>
</ul>
<p><b>The Details:</b></p>
<p>Dates May 15, 2013 through August 15, 2013 (can be flexible for the right candidate)<br />
3 days a week in the office</p>
<p>Sound interesting? Take a look around our <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3RoZWJyaWNrZmFjdG9yeS5jb20=" target=\"_blank\">website</a>, <a href="blog.thebrickfactory.com" target=\"_blank\">blog</a>, <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL2JyaWNrZmFjdG9yeQ==" target=\"_blank\">Facebook </a>and <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cHM6Ly90d2l0dGVyLmNvbS9Ccmlja0ZhY3Rvcnk=" target=\"_blank\">Twitter</a>. If you think we&#8217;d be a good fit please send a resume and cover letter to <a href="mailto:jobs@thebrickfactory.com">jobs@thebrickfactory.com</a>.</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5727" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/04/summer-internship-at-the-brick-factory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Your Type? 5 Sites with Great Typography</title>
		<link>http://blog.thebrickfactory.com/2013/04/whats-your-type-5-great-typography-sites/</link>
		<comments>http://blog.thebrickfactory.com/2013/04/whats-your-type-5-great-typography-sites/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 14:39:43 +0000</pubDate>
		<dc:creator>Sierra Jacobson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5538</guid>
		<description><![CDATA[It is said that a picture is worth a thousand words, but what is said when the design itself lies within the formatting of the word? Each letter, each stroke has a meaning, has a purpose and makes a statement all its own. So how many words, ideas and expressions are portrayed in a perfectly [...]]]></description>
				<content:encoded><![CDATA[<p>It is said that a picture is worth a thousand words, but what is said when the design itself lies within the formatting of the word? Each letter, each stroke has a meaning, has a purpose and makes a statement all its own. So how many words, ideas and expressions are portrayed in a perfectly curated and properly polished typography based website? Two-thousand? Three? Fifty? It is my perspective that this expression of sophisticated design cannot be quantified, rather simply appreciated for what it is.</p>
<p>So much lies in a word. A single word can stir emotions, spark excitement, cause a raucous, and make you stop and ponder, all within the meaning, purpose and in the web world, the design of the word itself. Below is a list of some of my favorite typography based websites. I chose these for the use of tailored fonts specific to their brand, the use of specific color to highlight their chosen text, and the seamless integration of just the right number of fonts used.<span id="more-5538"></span></p>
<p>Clean. Sophisticated. Modern.<em id="__mceDel"> </em><em id="__mceDel"><em id="__mceDel"><em id="__mceDel"><em id="__mceDel"><em id="__mceDel"><em id="__mceDel"><em id="__mceDel"> </em></em></em></em></em></em></em></p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5uZXd5b3JrZXIuY29tLw==">The New Yorker</a></h2>
<p style="text-align: center;"> <img class="size-full wp-image-5713 aligncenter" alt="New Yorker Screenshot" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/03/new_yorker.jpg" width="999" height="798" /></p>
<p>The publishing world understood the importance of perfect typography even before the web world caught on, and The New Yorker shows us just how it is done. I would go ahead and bet you can picture what The New Yorker type looks like. Their logo offers a perfect blend of whimsy, polish and just a hint of pretentiousness, and this trickles down throughout the entirety of the site.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5jb3JzYWlyYXJ0aXNhbi5jb20v">Corsair Distillery</a></h2>
<p><img class="aligncenter size-full wp-image-5714" alt="Corsair" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/03/corsair.jpg" width="999" height="762" /></p>
<p>This one may be just a bit of a biased choice on my part, being that I am from Nashville and actually used to work in this same building, but that is beside the point. Not only is this some wonderful whiskey, but the way they explain the boldness of their spirits just in the font and placement of text on their site show some skills in the typography department. The perfect blend of simply black and white with well chosen pops of color leaves us wanting to know more about their product, and by this I do mean a taste test is desired.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5iZWFzdGFuZHRoZWhhcmUuY29tLw==">Beast and the Hare</a></h2>
<p><img class="aligncenter size-full wp-image-5715" alt="Beast and Hare" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/03/beatandhare.jpg" width="999" height="510" /></p>
<p>Let’s be honest, when you are hungry and looking for a great restaurant, you want to get straight to the good part – the menu. What do they serve, what cocktails do they have, and are they still open? Beast and the Hare spelled it all out on this one page layout of their perfectly descript site. Clever and cool, this site is easy on the eyes and it lends itself to believe the food would also be easy on the lips.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2NpcmNsZW1lZXR1cHMuY29tLw==">Circle Meetups</a></h2>
<p><img class="aligncenter size-full wp-image-5717" alt="circles meetups" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/03/circles.jpg" width="999" height="492" /></p>
<p>The point of this site is to spark creativity within a group, or circle. Easy. Get people together, get a speaker and get creative. When it comes to their site, they kept it simple. In its simplicity it is actually quite genius. This site provides the information needed in a way that almost resembles a meeting invite you would add to your Google calendar. Nothing too fancy, yet cleverly displayed. While this is personal taste, I actually really like the oversized font throughout the homepage. I don’t feel that they are screaming at me, I feel that I my participation is quite zealously wanted.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy53YXJieXBhcmtlci5jb20=">Warby Parker</a></h2>
<p><img class="aligncenter size-full wp-image-5718" alt="Warby Parker Homepage" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/03/warby.jpg" width="969" height="666" /></p>
<p>While I am not 100% positive that I reside on the cool team able to wear these frames, I would like to think that I am. I appreciate the model and the site they have built. The pops of color mixed with the smooth type they have chosen showcases an essence of calmness and tranquility. This sense of ease makes my purchasing of a third, or fourth pair of glasses less stressful and more rational – right?</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5538" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/04/whats-your-type-5-great-typography-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Right Tool for the Job</title>
		<link>http://blog.thebrickfactory.com/2013/04/using-the-right-tool-for-the-job/</link>
		<comments>http://blog.thebrickfactory.com/2013/04/using-the-right-tool-for-the-job/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 14:22:18 +0000</pubDate>
		<dc:creator>John Bafford</dc:creator>
				<category><![CDATA[brickfactory]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5598</guid>
		<description><![CDATA[The Brick Factory&#8217;s development team has been writing custom PHP applications for ourselves and clients since 1999, and PHP development has changed quite considerably since then. At that time, and for years after, there were few available frameworks with which we could build our applications on, so all of our applications were developed from the [...]]]></description>
				<content:encoded><![CDATA[<p>The Brick Factory&#8217;s development team has been writing custom PHP applications for ourselves and clients since 1999, and PHP development has changed quite considerably since then. At that time, and for years after, there were few available frameworks with which we could build our applications on, so all of our applications were developed from the ground up, with later applications taking advantage of some reusable code libraries (most of which came from our ImpactWatch application, and others from our online training service).</p>
<p>In 2005, we started using WordPress for blog sites, and later, in 2007, we started to use Drupal for more complicated sites. Both can, to varying degrees, be called application frameworks (Drupal considerably more so than WordPress), and using these tools allowed us to create many websites covering a wide range of needs for our clients must faster than we could have if we had to write everything from scratch.</p>
<p>Actually, at one point before we adopted Drupal, we started to write our own CMS tool, and stopped when we realized that the amount of time we&#8217;d have to spend building it to meet our needs would be considerably larger than just using an existing open-source platform. And even if we succeeded in building something that met our standards, ultimately, we&#8217;d just be re-inventing the wheel that Drupal, WordPress, Joomla, and 40+ other CMS systems (<a title=\"according to Wikipedia\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9MaXN0X29mX2NvbnRlbnRfbWFuYWdlbWVudF9mcmFtZXdvcmtz">according to Wikipedia</a>) have spent years refining. And where&#8217;s the fun in that?</p>
<p>So, we&#8217;ve spent the last several years refining our skills with Drupal, even contributing back a few bug fixes and a Drupal module (<a title=\"Splashify\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2RydXBhbC5vcmcvcHJvamVjdC9zcGxhc2hpZnk=" target=\"_blank\">Splashify</a>) to the community, and we think we&#8217;ve gotten pretty good at Drupal site and module design and implementation.</p>
<p>In December, we started planning for <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5zd2F5aHEuY29t">Sway</a>, our next internal project. We have some ambitious goals with Sway, and we wanted to get something to market relatively quickly, so it was obvious early on that we had to use a framework of some sort. This meant we couldn&#8217;t use the internal workings of ImpactWatch or Training, as aside from a few reusable components, they were never designed and developed to the point of being significantly useful in other applications.</p>
<p>It also put Drupal out of consideration, as what we had in mind would require so much custom work that the strengths Drupal brought to the table would be outweighed by the time we&#8217;d spend working against it. Also, we wanted a chance to use the latest and greatest technologies. PHP 5.4 has been available for just over a year, and we wanted to be able to use it. Drupal 7, by comparison, doesn&#8217;t take advantage of many of the new features in PHP 5.3, let alone PHP 5.4.</p>
<p>Ultimately, we settled on <a title=\"Symfony\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3N5bWZvbnkuY29t" target=\"_blank\">Symfony</a>, and in January, started developing Sway using Symfony 2.1 (and quickly upgraded to Symfony 2.2 in March after it was released).</p>
<p>As an added bonus, working on Sway will give us a head-start in learning to use Drupal 8, which is expected to be released later this year. Core components from Symfony are being used in Drupal 8, so we&#8217;ll be able to put some of our experience working on Sway to use on any Drupal 8 sites we start working with. Both Symfony 2 and Drupal 8 use the <a title=\"Twig\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3R3aWcuc2Vuc2lvbGFicy5vcmc=" target=\"_blank\">Twig</a> template engine, so our designers will have time to become familiar with Twig before we have to start using it on Drupal sites.</p>
<p>We&#8217;re looking forward to what we&#8217;ll be able to accomplish with Sway, and with future versions of Symfony and Drupal. This should be an exciting year!</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5598" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/04/using-the-right-tool-for-the-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five Awesome HTML5 Interactive Pieces</title>
		<link>http://blog.thebrickfactory.com/2013/04/five-awesome-html5-interactive-pieces/</link>
		<comments>http://blog.thebrickfactory.com/2013/04/five-awesome-html5-interactive-pieces/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 18:55:27 +0000</pubDate>
		<dc:creator>Todd Zeigler</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5677</guid>
		<description><![CDATA[The technology people use to browse websites has changed dramatically the last few years.  Smartphones and tablets have become ubiquitous.  Desktop monitors are getting bigger.  Connectivity is getting better.  Browsers are getting more sophisticated and powerful. The approach to building website has evolved along with the technology people use to brose the Internet.  In the [...]]]></description>
				<content:encoded><![CDATA[<p>The technology people use to browse websites has changed dramatically the last few years.  Smartphones and tablets have become ubiquitous.  Desktop monitors are getting bigger.  Connectivity is getting better.  Browsers are getting more sophisticated and powerful.</p>
<p>The approach to building website has evolved along with the technology people use to brose the Internet.  In the last few years Flash has gone from ubiquitous to scarce.  And HTM5 has gone from an experimental technology to a fairly common way to build websites.</p>
<p>The rise of HTM5 and the fall of Flash have had a particularly dramatic impact on Interactive pieces.</p>
<p>I remember seeing this <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy50aGV3aWxkZXJuZXNzZG93bnRvd24uY29tLw==">Arcade Fire HTML5 interactive film</a> back in 2010, and being blown away by the possibilities it presented. While it is still pretty great, pieces like this have become more and more common over the last few years.  Following are five HTML5 interactive pieces I’ve come across in the last few months that push the boundaries of what is possible in browser.<span id="more-5677"></span></p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2pvdXJuZXkubGlmZW9mcGltb3ZpZS5jb20vIyEv">(1) Pi’s Epic Journey</a></h2>
<p><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="Life of Pi" alt="Interactive telling the story of the making of Life of Pi" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/04/life_of_pi1.jpg" width="999" height="511" border="0" /></p>
<p>This piece uses stunning photography and video to tell the story of the making of Life of Pi.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2V2ZXJ5bGFzdGRyb3AuY28udWsv">(2) Every Last Drop</a></h2>
<p><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="Every Last Drop" alt="Interactive showing how much water the average UK resident uses" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/04/every-last_drop.jpg" width="1072" height="833" border="0" /></p>
<p>This piece tells the story of how much water the average person in the UK uses in a given day.  All of the animation effects are triggered by users scrolling down the page.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2ludG90aGVhcmN0aWMuZ3Av">(3) North Pole Exhibition</a></h2>
<p><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="North Pole Exhibition" alt="Greenpeace interactive showing an exhibition to the North Pole." src="http://blog.thebrickfactory.com/wp-content/uploads/2013/04/greenpeace.jpg" width="999" height="552" border="0" /></p>
<p>Uses a combination of text, photos and maps, this interactive from Greenpeace tells the story of an exhibition to the North Pole.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2hhcmR1ZGV0aWRlZy5uby90ZXN0L2VuLmh0bWw=">(4) Teacher Test</a></h2>
<p><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="Teacher Test" alt="What does it take to become a teacher?" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/04/planets_thumb.jpg" width="999" height="564" border="0" /></p>
<p>This online quiz tests you on whether you have the base knowledge required to be a school teacher.  An HTML5 take on the classic online quiz.</p>
<h2><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5tb21hLm9yZy9pbnRlcmFjdGl2ZXMvZXhoaWJpdGlvbnMvMjAxMi9jZW50dXJ5b2Z0aGVjaGlsZC8jL3RpbWVsaW5lL3JlZ2VuZXJhdGlvbg==">(5) Century of the Child</a></h2>
<p><img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" title="Century of the Child" alt="MOMO exhibit Century of the Child" src="http://blog.thebrickfactory.com/wp-content/uploads/2013/04/century_of_child.jpg" width="999" height="530" border="0" /></p>
<p>This interactive is an online version of the Museum of Modern Art’s Century of the Child Exhibit. Great photography and extremely easy to use.</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5677" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/04/five-awesome-html5-interactive-pieces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Protect Your Code Against Injection Attacks</title>
		<link>http://blog.thebrickfactory.com/2013/04/how-to-protect-against-inject-attacks/</link>
		<comments>http://blog.thebrickfactory.com/2013/04/how-to-protect-against-inject-attacks/#comments</comments>
		<pubDate>Mon, 08 Apr 2013 16:08:10 +0000</pubDate>
		<dc:creator>Chris Tankersley</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5595</guid>
		<description><![CDATA[When I started working with PHP years ago, the first thing I did was go online and try to find tutorials. I worked with someone who also did PHP (and was the primary driver for wanting to learn the language), but finding out how to do things on my own fit better into my schedule. [...]]]></description>
				<content:encoded><![CDATA[<p>When I started working with PHP years ago, the first thing I did was go online and try to find tutorials. I worked with someone who also did PHP (and was the primary driver for wanting to learn the language), but finding out how to do things on my own fit better into my schedule. Eventually I got to working with databases, and the tutorials I found looked like this:</p><pre class="crayon-plain-tag">$sql = &quot;SELECT * FROM &quot;.$tableName.&quot; WHERE id=&quot;.$_GET['id'];
$result = mysql_query($sql);</pre><p>This is perfectly valid code. In fact, if you look at a lot of examples today you will see the same thing. There&#8217;s a huge flaw in these examples, and one that has given PHP a bad name when it comes to security. It isn&#8217;t the fault of the language but of the way that many developers learned how to do things. PHP makes it easy to shoot yourself in the foot and it doesn&#8217;t help that developers keep showing new developers how to do it. Get gun, point at foot, pull trigger. That&#8217;s essentially what the above example is showing you.</p>
<p>So, what is so wrong with the example code? The problem is that we aren&#8217;t validating anything. Do we know what <code>$_GET['id']</code> actually is? What happens if <code>$_GET['id']</code> is set to something that isn&#8217;t an integer?</p><pre class="crayon-plain-tag">// $_GET['id'] = 'bob'
$sql = &quot;SELECT * FROM users WHERE id=&quot;.$_GET['id'];
// $sql is now equal to &quot;SELECT * FROM users WHERE id=bob&quot;
$result = mysql_query($sql);</pre><p>When <code>mysql_query()</code> runs it will return false. Depending on how well your code handles a false return, someone screwing around with the query variables will learn that we didn&#8217;t properly make sure that the <code>id</code> query variable is being checked. At the very least they learned that changing query string parameters does cause the code to change. Depending on the setup of our code, it might even expose what database we&#8217;re using. If it&#8217;s MySQL, they can get crafty and do something like this:</p><pre class="crayon-plain-tag">// $_GET['id'] = '1 OR 1=1'
$sql = &quot;SELECT * FROM users WHERE id=&quot;.$_GET['id'];
// $sql is now equal to &quot;SELECT * FROM users WHERE id=1 OR 1=1&quot;
$result = mysql_query($sql);</pre><p>That little <code>OR 1=1</code> bit will cause the SQL server to return all of the data in the user&#8217;s database. Let&#8217;s take this a step further, and say that we are authenticating a user. Most of the examples would look like this:</p><pre class="crayon-plain-tag">$username = $_POST['username'];
// Using MD5 to hash passwords is bad, using ONLY as an example. Look into something like PasswordLib for a modern password solution
$password = md5($_POST['password']);
$sql = &quot;SELECT * FROM users WHERE username='&quot;.$username.&quot;' AND password='&quot;.$password.&quot;'&quot;;
$result = mysql_query($sql);</pre><p>We&#8217;re doing one thing correctly (forcing this data to come through the POST array), but we&#8217;re still not really validating that <code>$username</code> or <code>$password</code> are actually good valid values. We can still do the following:</p><pre class="crayon-plain-tag">// $_POST['username'] = &quot;admin' -- &quot;
$username = $_POST['username'];
$password = md5($_POST['password']);
$sql = &quot;SELECT * FROM users WHERE username='&quot;.$username.&quot;' AND password='&quot;.$password.&quot;'&quot;;
// $sql is now SELECT * FROM users WHERE username='admin' -- ' AND password='oasdnifniuh3h48puahergler' 
$result = mysql_query($sql);</pre><p>We&#8217;re in, and as a user where we didn&#8217;t even know the password. Why? The <code>--</code> will comment anything after it, so we dropped the <code>AND password=</code> portion of the SQL and do the select based on just the username. It will return a single value just like the code will expect, so your code never knows that it was altered.</p>
<p>Both of these attacks are called &#8220;SQL Injection Attacks&#8221;, and is part of the <a title=\"OWASP Top 10 Project\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cHM6Ly93d3cub3dhc3Aub3JnL2luZGV4LnBocC9DYXRlZ29yeTpPV0FTUF9Ub3BfVGVuX1Byb2plY3Q=">OWASP Top 10&#8242;s #1 attack vector</a>. The sad thing is that these are really easy to combat against. I see all the time on Reddit and Stack Overflow people asking for help and seeing this same sort of code. In 2013 we should have been able to stop this, but with years of old tutorials out there it is an uphill battle.</p>
<p>The reason that it sad to see this as still the #1 attack on OWASP is that it is easy to combat. The first and foremost is to stop using the <code>mysql_*</code> functions in your code. The module that handles those is old, and it doesn&#8217;t support the best way to handle SQL injections. Yes, it has <code>mysql_real_escape_string()</code>, but that relies on the developer remembering to use it. Better security comes from the developer having to not remember to do it and it just being built in.</p>
<p>Since PHP 5.0, PHP has shipped with something called <a title=\"PHP Data Objects\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3BocC5uZXQvbWFudWFsL2VuL2Jvb2sucGRvLnBocA==">PDO</a>. PDO is a database abstraction layer that makes it easier to write cross-database code. If you write your app for MySQL, you can more easily port it to something like Postgres or MSSQL by doing nothing more than changing the connection parameter (assuming you haven&#8217;t written any engine specific code like using <code>LIMIT</code>, which MySQL and Postgres support but MSSQL doesn&#8217;t).</p>
<p>PDO has another big advantage in that it has support for something called a Prepared Statement. With a prepared statement, the SQL query is parsed by the engine by taking a SQL statement and a list of parameters and putting them together itself instead of relying on a fully built SQL statement. This becomes much safer because the DB engine does all the work on properly quoting the values coming in. The side effect of this is that the worry about the developer being safe is offloaded somewhere else, so by using PDO and prepared statements the developer doesn&#8217;t need to worry about if a parameter has been sanitized.</p>
<p>Let&#8217;s go back to our first example, with the $_GET parameter. What would this look like with PDO?</p><pre class="crayon-plain-tag">$sql = &quot;SELECT * FROM users WHERE id=:id&quot;;
// $pdo is our PDO connection
$stmt = $pdo-&amp;gt;prepare($sql);
$stmt-&amp;gt;execute(array(
    &quot;:id&quot; =&amp;gt; $_GET['id']
));
$user = $stmt-&amp;gt;fetch();</pre><p>It&#8217;s a bit longer, but not so much that that there is a ton of extra work involved. What we did was create an SQL statement using placeholders, which in PDO can either be a <code>?</code> or named like our example, which was <code>:id</code>. We run our SQL through the <code><a title=\"PDO::prepare\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5waHAubmV0L21hbnVhbC9lbi9wZG8ucHJlcGFyZS5waHA=">prepare()</a></code> method on our PDO connection, which returns a statement object. This statement object gets executed, and at the same time we pass in the values for our placeholders. We can then get the user by calling the <code><a title=\"PDOStatement::fetch\" href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5waHAubmV0L21hbnVhbC9lbi9wZG9zdGF0ZW1lbnQuZmV0Y2gucGhw">fetch()</a></code> method on the statement.</p>
<p>We can rest assured that the SQL code is now safe from injections. That&#8217;s it! That is the single most effective way to combat SQL injections.</p>
<p>For older legacy applications switching out to PDO can be a major undertaking. Drupal did this in Drupal 7, where they replaced their underlying database abstraction layer to use PDO. Drupal didn&#8217;t use the database specific functions all over the codebase which made it somewhat easier to swap out, but if your application is riddle with calls to <code>mysql_*</code> or <code>pg_*</code> functions you will want to replace them all with PDO commands.</p>
<p>Do your part to help clean up the bad examples out there. If you ever do new code, use PDO. If you ever give examples, do it using PDO. Maybe we can make the internet a little better, and help knock SQL injections (and other injection types) off of the top of the OWASP Top 10.</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5595" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/04/how-to-protect-against-inject-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brick by Brick, Round 2</title>
		<link>http://blog.thebrickfactory.com/2013/04/brick-by-brick-round-2/</link>
		<comments>http://blog.thebrickfactory.com/2013/04/brick-by-brick-round-2/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 14:43:57 +0000</pubDate>
		<dc:creator>Todd Zeigler</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5633</guid>
		<description><![CDATA[It used to be that when you launched a new website you would have two to three years before the design started to feel dated.  Given how quickly things are moving now, a design can start feeling stale after as little as six months.  The battle against dated design is constant.  While its design was [...]]]></description>
				<content:encoded><![CDATA[<p>It used to be that when you launched a new website you would have two to three years before the design started to feel dated.  Given how quickly things are moving now, a design can start feeling stale after as little as six months.  The battle against dated design is constant.  While its design was only sixteen months old, we had gotten really sick of the design of our blog, Brick by Brick.   We needed a change.  So today we are pleased to launch a new version we think is a huge step forward (<a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL3Bob3RvLnBocD9mYmlkPTM2Nzg4NTgxMzMyMDA5OSZhbXA7c2V0PWEuMTQzNDQyMjIyNDMxMTI3LjI3NzA4LjExMDE2NzA2NTc1ODY0MyZhbXA7dHlwZT0xJmFtcDt0aGVhdGVy">see a before and after here</a>).  Following is a breakdown of the primary improvements we made.</p>
<h2>Readability</h2>
<p>I’m stating the obvious here, but your blog should really be about your content.  The design should get out of the way and let the posts be the star.</p>
<p>Our primary focus in redesigning our blog was to better showcase the content itself  by increasing readability.  To achieve this we:</p>
<ul>
<li>Switched our primary font to Georgia.   We chose Georgia because it works well with the font used in our logo (Avenir), is a pleasure to read, and isn’t used on every site on the web like Arial. I think it adds a bit of elegance to the blog.</li>
<li>Jumped on the big type bandwagon and upped the sizes of our fonts throughout.</li>
<li>Switched from full justification of text to the justify left, ragged right style.  Full justification is more elegant and looks better on first glance, which is why it is still the dominant approach in book publishing.  Left justified, ragged right is easier to read online and has a bit more of an informal look, which we thought appropriate for our blog.</li>
<li>Changed to a one column layout.  Our previous blog had a sidebar with a list of recent posts and a subscribe box.  We found that very few people were clicking on any of that stuff, and going to one column gives us room for larger images to accompany our posts.</li>
</ul>
<h2>Illustrations</h2>
<p>We have a talented team of designers that we frankly don’t utilize as much as we should on our blog.  To rectify this we decided to have our design team develop quick illustrations to accompany most of our posts.  They did the illustration for this post, as well as for <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2Jsb2cudGhlYnJpY2tmYWN0b3J5LmNvbS8yMDEzLzAzL3Bvc3NpYmx5LXRoZS1ncmVhdGVzdC1hcnRpY2xlLWFib3V0LWhlYWRsaW5lLXdyaXRpbmctZXZlci13cml0dGVuLw==">this one</a> and <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2Jsb2cudGhlYnJpY2tmYWN0b3J5LmNvbS8yMDEzLzAzL3BvdW5kaW5nLXRoZS1yb2NrLw==">this one</a>.  I love them.  I think they really add something to our blog.</p>
<h2>Responsiveness</h2>
<p>Our new blog is completely responsive, so that the layout adjusts along with screen size.  This means it looks great on a desktop, tablet, or mobile phone.  Nearly all the sites we are building now are responsive to some degree, so it made sense that our own blog would be.  We think this is how sites will be designed moving forward.</p>
<p>Let us know what you think.</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5633" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/04/brick-by-brick-round-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unit Testing In Drupal</title>
		<link>http://blog.thebrickfactory.com/2013/04/testing-drupal/</link>
		<comments>http://blog.thebrickfactory.com/2013/04/testing-drupal/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 16:10:30 +0000</pubDate>
		<dc:creator>Chris Tankersley</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5507</guid>
		<description><![CDATA[PHP is a language that traditionally has not had unit testing as part of the development process. A large part of that was that way back when, there just weren&#8217;t any good tools for doing testing. Another major factor is that many of the learning resources for PHP do not mention doing things like unit [...]]]></description>
				<content:encoded><![CDATA[<p>PHP is a language that traditionally has not had unit testing as part of the development process. A large part of that was that way back when, there just weren&#8217;t any good tools for doing testing. Another major factor is that many of the learning resources for PHP do not mention doing things like unit tests, which is a major contrast to languages like Ruby. I personally think this has helped lead to the notion that PHP code is much harder to maintain than other languages.</p>
<p>PHP is nearly 20 years old now, and today we have the tools to do proper unit and functional testing without having to go through the pain of writing those kind of systems ourselves. At The Brick Factory, we tend to use the Drupal CMS quite a bit, and thankfully Drupal has a proper testing system built right in.</p>
<p><span id="more-5507"></span></p>
<h2>Why Unit Test?</h2>
<p>Unit Testing allows you to make sure that your code works as you expect it to. Let&#8217;s say you have a class that calls an API and returns customer information. If you always expect to get an array, you should test situations and make sure that you always get an array back. You don&#8217;t want your code to rely on that array and break all of a sudden when a boolean is returned, or a string is returned. By testing your code you are better able to say that your code works.</p>
<p>On the flip side, when you do discover a bug you can reproduce it in a test, and then once that test passes you know that you fixed the bug. Does that API you are calling sometimes error out when you don&#8217;t put dashes in the phone number? Well, you can reproduce that response and have your code handle it properly, and document that the bug is fixed with your tests.</p>
<p>The other nice benefit of unit testing code is that you make sure your code is not directly dependent upon any other code. To make unit testing easier the chunks of code should be separated out so that you can quickly mock up interfaces you aren&#8217;t testing. In our API example, we would have another object that generates fake API results for us to test since we are testing how we handle responses, not the actual API itself. If we decide to change the service we are using down the road, we can quickly swap out the API since it isn&#8217;t tightly coupled to our code.</p>
<h2>How Testing Works</h2>
<p>To properly test something, you need to write your tests, watch them fail, fix the failures, and then watch them pass. The reason for this is your tests set up the expectations for how you think your code will work, and then you need to make the code work against those expectations. If you build your tests after you already do your code you tend to &#8216;fix&#8217;  your tests instead of fixing your code when you find problems. In PHP you have to bootstrap your tests a bit and actually build classes and methods as you start to write your tests since PHP tends to not like classes that don&#8217;t exist.</p>
<p>There are a few different ways that you can run your tests. At the Brick Factory we tend to use Drupal for many of our projects, and Drupal ships with an implementation of <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL2RydXBhbC5vcmcvcHJvamVjdC9zaW1wbGV0ZXN0" target=\"_blank\">SimpleTest</a>. SimpleTest is a web-based test runner, and the Drupal module provides a way for modules to register tests with SimpleTest and then run them from inside Drupal. SimpleTest also works with <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5kcnVzaC5vcmcv" target=\"_blank\">drush</a>, so you can run your unit tests through the drush command line program.</p>
<p>When building a module for Drupal you can include a <code>mymodule.test</code> file that the SimpleTest runner will launch to run your tests. You add a class inside this file that contains your tests and SimpleTest takes care of the rest.</p>
<h2>Writing a Test</h2>
<p>Writing a test is actually really easy (writing testable code is an entirely different issue though). To create a test, you need to create a test file. Let&#8217;s create a module that generates a block, and this block will output a list of repositories for a user on Github, a popular code hosting site. We&#8217;ll need to build something to talk to the Github API, and something to parse the results. Our module will be called <code>tbf_github</code>. Let&#8217;s look at building that second part.</p>
<h3>Creating the Test Suite</h3>
<p>The first thing we will need to do is create our test suite. A test suite is a class that contains a series of tests, and for Drupal it will either extend DrupalWebTestCase for functional tests, or DrupalUnitTestCase for unit tests. It will also need to need to implement the getInfo() method, which is a static method that returns some information about the test itself. Let&#8217;s build our first test suite by creating the file <code>tbf_guthub.test</code> inside of our module directory, and adding the code below.</p><pre class="crayon-plain-tag">class TbfGithubParserTestCase extends DrupalUnitTestCase {
    static public function getInfo() {
        return array(
            'name' =&amp;gt; 'TBF Github Parser Unit Tests',
            'description' =&amp;gt; 'Unit tests for the Github parser',
            'group' =&amp;gt; 'tbfgithub'
        );
    }

    public function testGetRepoNames() {
    }
}</pre><p></p>
<h4>Functional vs Unit Testing</h4>
<p>I mentioned that there are two different classes that extend your own test suite from. This is because Drupal allows you to do Functional as well as Unit Testing. The big difference is that Functional testing via DrupalWebTestCase bootstraps Drupal entirely. This allows you to do things like log in users, access things in the database, or render pages to test output. The downside is that functional tests are slow because Drupal is completely torn down, reconstructed, and invoked <em>every</em> test. It is very resource intensive.</p>
<p>Unit tests do not do anything like that. They strictly test the code you need, but that means you don&#8217;t have access to the database or users or anything like that. That&#8217;s OK! Unit testing shouldn&#8217;t rely on multiple systems.</p>
<h3>Our First Test</h3>
<p>When we created the test suite, we added a <code>testGetRepoNames()</code> method to our class. Tests in SimpeTest are methods that begin with &#8216;test&#8217; for the method name, so you can also have extra methods that aren&#8217;t run automatically. Let&#8217;s write the first test, which should test to see if we get back the repo names we are expecting.</p>
<p>Before we do that, we need to create a skeleton for our class. PHP doesn&#8217;t like if if you call a class that doesn&#8217;t exist, so let&#8217;s create the class for our parser and stub out a method for parsing repos.</p><pre class="crayon-plain-tag">// In file Tbf_GithubParser.php
class Tbf_GithubParser {
    function parseRepos($response) {
    }
}</pre><p></p><pre class="crayon-plain-tag">// Include our class
require_once 'Tbf_GithubParser.php

class TbfGithubParserTestCase extends DrupalUnitTestCase {
    // ...
    public function testGetRepoInfo() {
        // Get a stored response from Github so we don't have to hit the real API
        $response = file_get_contents('_tests/response_repo.json');
        $githubParser = new Tbf_GithubParser();

        $repos = $githubParser-&amp;gt;parseRepos($response);

        $this-&amp;gt;assertEquals(3, count($repos), 'Should have had 3 repos but ended up with '.count($repos));
        $this-&amp;gt;assertEquals('myrepo', $repos[0]['name'], 'First repo should be named &quot;myrepo&quot; but it was named '.$repos[0]['name']);
    }
}</pre><p>If we run this test right now, it will fail. <code>parseRepos()</code> doesn&#8217;t return anything, and that&#8217;s OK. The big point here is that now we know this doesn&#8217;t work, so let&#8217;s fix it.</p><pre class="crayon-plain-tag">// In file Tbf_GithubParser.php
class Tbf_GithubParser {
    function parseRepos($response) {
        return json_decode($response, true);
    }
}</pre><p>Now if we run the test, it should pass if our <code>$response</code> JSON is correct. Since we&#8217;re using a canned response from a file we can make sure that the response has three repos and the first one has the correct name of &#8216;myrepo&#8217;.</p>
<p>That&#8217;s it. That&#8217;s unit testing as well as Test Driven Development.</p>
<h3>Wait, why doesn&#8217;t the parser interact with Github directly?</h3>
<p>One thing you will notice with the code is that the our parser doesn&#8217;t work directly with Github and just parses the result. Our code still doesn&#8217;t talk with Github. There&#8217;s a reason for that, and it&#8217;s called Separation of Concerns. Our parser shouldn&#8217;t interact with Github directly, just parse the results. Our parser shouldn&#8217;t care if we use curl, or streams, or whatever to get the response. It&#8217;s something else&#8217;s job to interact with Github.</p>
<p>By the same token, whatever object actually talks to Github shouldn&#8217;t care about the output. It should deal with talking with Github and just returning the response. By splitting processing out of the API interaction we can manipulate the responses any way we want. In our case, we&#8217;re turning the JSON into an array that we can get data from.</p>
<p>Properly separating out your responsibilities makes it much easier to test. In our test we didn&#8217;t need to actually interact with the Github API so our test was very quick. We&#8217;re also safe because of the API is down, our tests would break, or our tests will break if a repo we are testing is deleted. By keeping these systems separate we can make sure that our code still works. This is different than Functional testing, where we do want to test multiple systems at once to see if they are working together properly.</p>
<h2>Running Tests</h2>
<p>I glossed over this in the previous section, but in Drupal you can run tests two ways. One way is through the web test runner, and the other is from the command line using drush.</p>
<p>To run the tests via the web, go to the administration, Configuration, and then &#8216;Testing 2.x&#8217;. You will see a list of test groups to run. Just put a check next to the tests you want to run. Click &#8216;Run Test&#8217; and everything will start to work.</p>
<p>The tests will run, and you will get a nice little readout about their status. Once all the tests are done, you can see which ones failed and fix them. If you have functional tests that extend DrupalWebTestCase these will take longer to run. Failures are red, warnings are yellow, and green is passed. You want everything green.</p>
<p>To run tests with drush, drop to a command line and run:</p><pre class="crayon-plain-tag">$ drush test-run --uri=http://mysite.local</pre><p>and replace the &#8211;uri portion with the URL of your site. This will list all of the tests that are available in your site, and you can run them with:</p><pre class="crayon-plain-tag">$ drush test-run --uri=http://mysite.local NameOfTest</pre><p>of you can use &#8211;all instead of a test name to run everything. This isn&#8217;t much faster than running it through the web interface, and it is a bit harder to read, but you can sometimes seem more information than what the web runner does. It also doesn&#8217;t break as easily as the web test runner.</p>
<h2>Testing is a Good Thing</h2>
<p>With a little bit of time invested up front, we can automatically know at any point if our code is working as we expect. It provides us with better structured code that can be extended quicker, and when we find bugs we can identify them quicker. Knowing that changes can quickly be tested against a larger codebase with the click of a button helps developers have confidence that their code is working.</p>
<p>Drupal makes it easy to get going with testing by providing various interfaces for writing and running your tests. Next time you need to write module code, take a look at making unit testing part of that process.</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5507" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/04/testing-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Possibly The Greatest Article About Headline Writing Ever Written</title>
		<link>http://blog.thebrickfactory.com/2013/03/possibly-the-greatest-article-about-headline-writing-ever-written/</link>
		<comments>http://blog.thebrickfactory.com/2013/03/possibly-the-greatest-article-about-headline-writing-ever-written/#comments</comments>
		<pubDate>Sat, 23 Mar 2013 18:30:07 +0000</pubDate>
		<dc:creator>Todd Zeigler</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5585</guid>
		<description><![CDATA[With the rise of social networks like Twitter, Facebook and Pinterest the way content is discovered has changed dramatically the last few years. If you want to be successful, your content strategies have to evolve along with the discovery mechanisms. From a content creation standpoint, one of the things that has changed the most the [...]]]></description>
				<content:encoded><![CDATA[<p>With the rise of social networks like Twitter, Facebook and Pinterest the way content is discovered has changed dramatically the last few years. If you want to be successful, your content strategies have to evolve along with the discovery mechanisms.</p>
<p>From a content creation standpoint, one of the things that has changed the most the last few years is the the headline.</p>
<p>When I first started writing blog posts ten years ago I treated the article headline as an afterthought.  I’d spend hours on a blog post and then approximately thirty seconds on the headline.   As I got a bit more savvy I started writing keyword-rich headlines with search engines in mind.</p>
<p>As Facebook and Twitter have taken off, my focus has evolved further.  Facebook and Twitter users are barraged with hundreds of posts/links a day and make the decision on whether to click or not in just a few seconds.  To succeed in this competitive environment you have to make your headline click-worthy.  A headline has to grab readers attention and compel them to click.  A click-worthy headline is a way of pushing the snowball down the hill.</p>
<p>One media company that gets the importance of headlines is <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy51cHdvcnRoeS5jb20v">Upworthy</a>.  Upworthy requires writers to draft 25 headlines for every single article.  They then test the headlines to see which ones generate the highest click rates and use that as the permanent article headline.  All the effort pays off.  <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5lZGl0b3Jzd2VibG9nLm9yZy8yMDEzLzAzLzA3L3Vwd29ydGh5LXMtc3VjY2Vzcy1kZW1vbnN0cmF0ZXMtaW1wb3J0YW5jZS1vZi1jbGlja2FibGUtaGVhZGxpbmVz">Upworthy has found</a> that “an item’s traffic can differ by as much as 500 percent simply because of the headline.”</p>
<p>Here are some examples of click-worthy headlines I found on Upworthy today:</p>
<ul>
<li><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy51cHdvcnRoeS5jb20vcG9zc2libHktdGhlLW1vc3QtZGV2YXN0YXRpbmctcmVzcG9uc2UtaXZlLWV2ZXItc2Vlbi1pbi1hbi1pbW1pZ3JhdGlvbi1kZWJhdGU/Yz1mZWE=">Possibly The Most Devastating Response I&#8217;ve Ever Seen In An Immigration Debate</a></li>
<li><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy51cHdvcnRoeS5jb20vdGhpcy1pcy13aGF0LWl0LWxvb2tzLWxpa2Utd2hlbi1hLWNpdHktZmlnaHRzLWZvci1pdHMtc2Nob29scw==">This Is What It Looks Like When A City Fights For Its Schools</a></li>
<li><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy51cHdvcnRoeS5jb20vdHdvLWJhcmtpbmctZG9ncy1hLW1vdGhlci1vZi10aHJlZS1hbmQtb25lLW91dHJhZ2VvdXMtZGVwb3J0YXRpb24tdGhhdC15b3UtY2FuLXM=">Two Barking Dogs, A Mother Of Three, And One Outrageous Deportation That You Can Stop</a></li>
<li><a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy51cHdvcnRoeS5jb20vc3dvb24td2F0Y2gtdGhpcy1zdGFyLWNhbG1seS1ibG93LWFwYXJ0LWFueS1hcmd1bWVudC10aGF0LXdlLWNhbnQtc29sdmUtcG92ZXJ0eQ==">SWOON: Watch This Star Calmly Blow Apart Any Argument That We Can&#8217;t Solve Poverty In One Generation</a></li>
</ul>
<p>The thing about these examples is that the content isn’t necessarily click-worthy in and of itself.  These aren’t <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5idXp6ZmVlZC5jb20vcGVycGV0dWEvdGhlLTEwLW1vc3QtaW1wb3J0YW50LXRoaW5ncy1qdXN0aW4tdGltYmVybGFrZS1kaWQtb24tZmFsbG9u">listicles</a> or articles about <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5idXp6ZmVlZC5jb20vbWF0dGJlbGxhc3NhaS9hbmltYWxzLXRoYXQtYXJlLXJlYWxseS10cnlpbmctdG8tYmUteW91ci1mcmllbmQtaWYteW91bGw=">cute animals</a> or <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5idXp6ZmVlZC5jb20vbWpzNTM4LzE1LWluc2FuZWx5LXNleHktcGljdHVyZXMtb2Ytcnlhbi1nb3NsaW5nLXB1bXBpbmctZ2Fz">Ryan Gosling</a>.  These are pieces about immigration, the plight of our schools and poverty.  Great headlines are what make you want to click, not necessarily the subject matter itself.</p>
<p>As I work to improve my own headline writing, I’ve found these two simple tips to be helpful</p>
<ol>
<li>I consciously think about what all the headlines I write will look like when I post them to Facebook and Twitter.  I still consider search engines, but my headlines are now written primarily for social networks.  As a result, my headlines have gotten a bit more casual and tongue and cheek.</li>
<li>I make myself write ten headlines for every article and take my time in choosing which one to use.  I haven’t gotten to the point of doing testing like Upworthy does, but by taking the time to brainstorm my options I’ve found the quality of my headlines has improved and I’m seeing more clicks (and shares).  I’m no longer just using the first headline I come up with or writing exclusively for Google’s bots.</li>
</ol>
<p>I’m still not a great headline writer, as evidenced by the headline to this article.  But by giving more thought to the headlines I’m getting a bit better every time out.</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5585" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/03/possibly-the-greatest-article-about-headline-writing-ever-written/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pounding the Rock: Lessons from the San Antonio Spurs on running a great digital campaign</title>
		<link>http://blog.thebrickfactory.com/2013/03/pounding-the-rock/</link>
		<comments>http://blog.thebrickfactory.com/2013/03/pounding-the-rock/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 15:36:41 +0000</pubDate>
		<dc:creator>Todd Zeigler</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blog.thebrickfactory.com/?p=5529</guid>
		<description><![CDATA[I grew up in San Antonio and like everyone from there I’m a big fan of the San Antonio Spurs. Since drafting Tim Duncan in 1997, the Spurs have gone on an unprecedented run, winning four NBA titles and more than 50 regular games each season for the last thirteen years.  Led by their cranky [...]]]></description>
				<content:encoded><![CDATA[<p>I grew up in San Antonio and like everyone from there I’m a big fan of the San Antonio Spurs. Since drafting Tim Duncan in 1997, the Spurs have gone on an unprecedented run, winning four NBA titles and more than 50 regular games each season for the last thirteen years.  Led by their cranky coach, Gregg Popovich, the Spurs are celebrated for their unselfishness and commitment to team.</p>
<p>The following quote from Dutch American reformer Jacob Riis hangs in the <a href="http://blog.thebrickfactory.com/?feed-stats-url=aHR0cDovL3d3dy5wb3VuZGluZ3RoZXJvY2suY29tLzIwMTEvMTIvMjcvMjEwMzExNy9qYWNvYi1yaWlzLWJpb2dyYXBoeS1wb3VuZGluZy10aGUtcm9jay1zdG9uZWN1dHRlci1jcmVkbw==">Spurs dressing room</a> and serves the team’s unofficial motto:</p>
<blockquote><p>“When nothing seems to help, I go and look at a stonecutter hammering away at his rock perhaps a hundred times without as much as a crack showing in it. Yet at the hundred and first blow it will split in two, and I know it was not that blow that did it, but all that had gone before.”</p></blockquote>
<p>In the context of basketball, the quote is an obvious call for players to put maximum effort into everything they do.  Winning an NBA title is the culmination of years spent taking jumpers in the gym when no one else is watching.  To be great you have to pound the rock.</p>
<p>The quote is also an accurate description of what it takes to build and maintain a great digital program.</p>
<p>There are tons of organizations that want a great, successful online campaign but don’t want to put in the work.  The truth is there really aren’t short cuts.  The truth is that building websites and running digital campaigns is hard work that requires a significant commitment.  A successful web program isn’t the result of one transcendent idea so much as it is hundreds of small ideas implemented well.</p>
<p>To be great you have to write compelling content every week, and preferably every day.</p>
<p>To be great you have to optimize your email messaging and design.</p>
<p>To be great you have to make sure your website works in all browsers (even IE) on all devices (desktop, tablet and smartphone).</p>
<p>To be great you have to experiment.</p>
<p>To be great you have to test and then test some more.</p>
<p>To be great you have to pound the rock.</p>
 <img src="http://blog.thebrickfactory.com/?feed-stats-post-id=5529" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.thebrickfactory.com/2013/03/pounding-the-rock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
