<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:admin="http://webns.net/mvcb/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
    <title>Forum One Tech Blog</title>
    <link>http://tech.forumone.com/</link>
    <description>Insight on Technology Trends from Forum One</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.0.3 - http://www.s9y.org/</generator>
    <pubDate>Wed, 04 Nov 2009 23:00:34 GMT</pubDate>

    <image>
        <url>http://tech.forumone.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Forum One Tech Blog - Insight on Technology Trends from Forum One</title>
        <link>http://tech.forumone.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ForumOneTechBlog" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
    <title>How-to selectively import data from a data file in MySQL 5</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/GrmuOBxYuCA/177-How-to-selectively-import-data-from-a-data-file-in-MySQL-5.html</link>
            <category>Database Design</category>
    
    <comments>http://tech.forumone.com/archives/177-How-to-selectively-import-data-from-a-data-file-in-MySQL-5.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=177</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=177</wfw:commentRss>
    

    <author>nospam@example.com (Dan Crowder)</author>
    <content:encoded><![CDATA[
    If you ever need to import a selected number of columns from a data file in MySQL then this how-to is for you!<br />
<br />
Recently I had to import a data file (tab delimiter) containing geo-coding data for zip codes into a table that had less columns than the data file and the columns were not in the same order as my database table. Using MySQL's <strong>LOAD DATA INFILE 'path_to_file'</strong> syntax and <strong>@User_Variables</strong> I was easily able to get the data that I needed into the table.<br />
<br />
<strong>Data file colums:</strong><br />
The data format is tab-delimited text in utf8 encoding, with the following fields :<br />
<br />
country code      : iso country code, 2 characters<br />
postal code       : varchar(10)<br />
place name        : varchar(180)<br />
admin name1       : 1. order subdivision (state) varchar(100)<br />
admin code1       : 1. order subdivision (state) varchar(20)<br />
admin name2       : 2. order subdivision (county/province) varchar(100)<br />
admin code2       : 2. order subdivision (county/province) varchar(20)<br />
admin name3       : 3. order subdivision (community) varchar(100)<br />
latitude          : estimated latitude (wgs84)<br />
longitude         : estimated longitude (wgs84)<br />
accuracy          : accuracy of lat/lng from 1=estimated to 6=centroid<br />
<br />
<strong>Database table columns:</strong><br />
zip<br />
city<br />
state<br />
latitude<br />
longitude<br />
timezone<br />
dst<br />
country<br />
<br />
When doing an import from a data file there are a few things that you need to take note of and adjust your import script and/or table definition accordingly.<ul><br />
<li>How your columns/fields are terminated.</li><br />
<li>How your data (column values) are enclosed.</li><br />
<li>How your rows are terminated.</li><br />
<li>How large of a entry will your values be and does the column definition of your database table expect the maximum size. If not, your data will be truncated to the maximum allowed length.</li><br />
</ul><br />
Once your table structure has been adjusted to accommodate the data expected to be imported you are ready to write your script.<br />
<br />
<strong>Rules on importing in MySQL 5:</strong><br />
<ul><li>The order of the columns are dictated by the data file, not the table.</li><li>You have to account for every column within the data file rows.</li></ul><br />
<br />
So the fields that I want to capture are mapped to their respective table columns:<br />
<br />
datafile columns--------------table columns<br />
country code-------------------country<br />
postal code----------------------zip<br />
place name----------------------city<br />
admin name1-------------------<br />
admin code1--------------------<br />
admin name2-------------------<br />
admin code2--------------------<br />
admin name3-------------------<br />
latitude---------------------------latitude<br />
longitude-------------------------longitude<br />
accuracy-------------------------<br />
<br />
In order to produce a query statement that will adhere to the rules mentioned above we need use @User_Variables as fillers for the columns/fields that we are ignoring.<br />
<br />
User variables are created by simply using the '@' sign in front of a variable name (ie, @user_variable). The naming convention of the user variable really doesnt matter when being used. But I will use @ignore just for readability sake.<br />
<br />
Below is the new mapping with the addition of the user variable, @ignore, which again is being used as a simple filler to get to the columns/fields that we want to import.<br />
<br />
datafile columns---------------table columns<br />
country code-------------------country<br />
postal code----------------------zip<br />
place name----------------------city<br />
admin name1-------------------@ignore<br />
admin code1--------------------@ignore<br />
admin name2-------------------@ignore<br />
admin code2--------------------@ignore<br />
admin name3-------------------@ignore<br />
latitude---------------------------latitude<br />
longitude-------------------------longitude<br />
accuracy-------------------------<em>(not need cause we do not need to get to any columns after this one)</em><br />
<br />
With the completed mapping we can write our script as such.<br />
<br />
<div style="border: 1px dashed rgb(35, 85, 135); padding: 10px; background: rgb(241, 246, 251) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">LOAD DATA INFILE '/path_to_file/datafile.txt'<br />
INTO TABLE zipcode<br />
FIELDS TERMINATED BY '\t'<br />
LINES TERMINATED BY '\n'<br />
(country,zip,city,@ignore,@ignore,@ignore,@ignore,@ignore,latitude,longitude);</div><br />
<br />
<strong>Query Explained</strong><br />
LOAD DATA INFILE '/path_to_file/datafile.txt' ---------Points to the location of the data file.<br />
INTO TABLE zipcode ----------------------------------------------Points the the table that we want to import into.<br />
FIELDS TERMINATED BY '\t'   ---------------------------------Specifies how the fields are terminated. In our case, they are terminated by a tab, '\t'.<br />
LINES TERMINATED BY '\n'   ----------------------------------Specifies how the lines are terminated. In our case, they are terminated by a new line break, '\n''<br />
(country,zip,city,@ignore,@ignore,@ignore,<br />
@ignore,@ignore,latitude,longitude); --------------------Specifies the table columns that we want to map the incoming data to. Again, the order is dictated by the data file.<br />
<br />
For more information on importing data in MySQL 5 visit, <a href="http://dev.mysql.com/doc/refman/5.0/en/load-data.html" >http://dev.mysql.com/doc/refman/5.0/en/load-data.html</a>.<br />
 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/GrmuOBxYuCA" height="1" width="1"/>]]></content:encoded>

    <pubDate>Wed, 04 Nov 2009 16:05:05 -0500</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/177-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/177-How-to-selectively-import-data-from-a-data-file-in-MySQL-5.html</feedburner:origLink></item>
<item>
    <title>Pods: An introspective on software development</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/juztGS5CREI/176-Pods-An-introspective-on-software-development.html</link>
            <category>Open Source</category>
            <category>Programming</category>
    
    <comments>http://tech.forumone.com/archives/176-Pods-An-introspective-on-software-development.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=176</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=176</wfw:commentRss>
    

    <author>nospam@example.com (Matt Gibbs)</author>
    <content:encoded><![CDATA[
    <a href="http://pods.uproot.us/"  title="Pods">Pods</a> is a pet project that I've been working on for more than a year. It's purpose is to sit on top of WordPress and allow for users to create custom data structures, called <a href="http://tech.forumone.com/archives/154-What-is-a-Content-Type.html">content types</a>. It's sort of like Drupal CCK, but for WordPress.<br />
<br />
The biggest challenge for the Pods team isn't what most developers would expect. It's not the coding itself, the bug tracking, or the release testing. The toughest aspect for us is <strong>balancing coding and documentation</strong>. We're not proud of our documentation yet, but we're finally aware of how important it is for our project (or any project) to suceeed.<br />
<br />
There are many great open source projects out there. A lot of great projects also fail. Why?<br />
<br />
It's not necessarily because their code is obsolete, or because there are better ways of doing things than their project code allows. <strong>Most of the time, projects fail simply because people don't know how to use it.</strong> The software itself isn't intuitive enough, the documentation sucks, or both. Your potential users move on, and your software gets left behind.<br />
<br />
The <a href="http://ma.tt"  title="Creator of WordPress">WordPress team</a> didn't succeed only because the software itself is easy to use (although it didn't hurt). WordPress succeeded because when you can't figure something out, the well-written <a href="http://codex.wordpress.org/Plugin_API"  title="Codex">documentation</a> and <a href="http://wordpress.tv/category/how-to/"  title="WordPress.tv">tutorials</a> are there to guide you in the right direction. It's only after your users start reaching "Ah-ha!" moments that your community can really start to flourish.<br />
<br />
In the spirit of documenting how Pods works, here's the first of (hopefully) many tutorial videos. Enjoy.<br />
<br />
<object width="480" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6957771&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6957771&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="480" height="300"></embed></object> 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/juztGS5CREI" height="1" width="1"/>]]></content:encoded>

    <pubDate>Thu, 29 Oct 2009 08:42:26 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/176-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/176-Pods-An-introspective-on-software-development.html</feedburner:origLink></item>
<item>
    <title>Eclipse Works With Preexisting Code, But Not Well</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/FuXZ3WCh_Ic/172-Eclipse-Works-With-Preexisting-Code,-But-Not-Well.html</link>
            <category>Tools</category>
    
    <comments>http://tech.forumone.com/archives/172-Eclipse-Works-With-Preexisting-Code,-But-Not-Well.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=172</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=172</wfw:commentRss>
    

    <author>nospam@example.com (Sandy Smith)</author>
    <content:encoded><![CDATA[
    I recently upgraded <a href="http://www.eclipse.org/pdt/"  title="Eclipse PHP Development Toolkit">Eclipse PDT</a> to the most recent version, and I decided to figure out something that had been bugging me: why couldn't Eclipse use a project I'd already checked out via the command line to the same workspace?<br />
<br />
A colleague suggested that I could indeed do it, and that I just needed to start a new project but check "Create project from existing source." This does work, but it has a couple of restrictions that explain why I was having so many problems and why it's kind of useless for me.<br />
<br />
<ol><li><strong>Projects from existing sources cannot be in your workspace</strong>. I have no idea why this restriction exists. I could understand why starting a project inside another project would be bad, but all Eclipse has to do is add a couple of extra files to a directory. Nonetheless, all the sites I'd set up in my workspace and had been using other text editors to edit were unusable. <a href="http://www.panic.com/coda/"  title="Coda">Coda</a>, by contrast, will happily take over an existing project, no matter where it is or what is in it. Interestingly, you can set up a workspace inside another workspace, so I could get around this by creating another workspace that pointed to a subfolder of my current workspace that contained the source code I wanted to use.</li><br />
<li><strong>If using subversion, <a href="http://subclipse.tigris.org/"  title="Subclipse">Subclipse</a> will not be able to work with your checked out copy if the versioned files are in a subdirectory of your project</strong>. This is also strange to me. In Drupal, for example, we only version the <code>sites/all</code> directory and use <a href="http://drupal.org/project/drush"  title="Drush, the DRupal SHell">Drush</a> to update the main application. In other projects, we have versioned code outside the public root and create the public root from a tarball we keep in the repository. Since these files have configurations that shouldn't be versioned, I want to be able to edit them in Eclipse while using Subclipse to control the versioned part. Sadly, this restriction means I can't do that.</li></ol><br />
<br />
So my workflow is still to create subdirectories, including a public root, in my workspace by hand, and then importing the project from Subversion with Eclipse's Import function. These seem like pointless restrictions to me. If anybody knows a workaround, I'd be grateful. 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/FuXZ3WCh_Ic" height="1" width="1"/>]]></content:encoded>

    <pubDate>Thu, 08 Oct 2009 11:25:29 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/172-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/172-Eclipse-Works-With-Preexisting-Code,-But-Not-Well.html</feedburner:origLink></item>
<item>
    <title>CodeWorks 09 DC</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/CO9f4CeM_yQ/170-CodeWorks-09-DC.html</link>
            <category>PHP</category>
    
    <comments>http://tech.forumone.com/archives/170-CodeWorks-09-DC.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=170</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=170</wfw:commentRss>
    

    <author>nospam@example.com (Sandy Smith)</author>
    <content:encoded><![CDATA[
    <img src="http://static.mtacon.com/codeworks/img/template/logo.png" alt="CodeWorks 09" style="float: right; margin: 4px;" />Thought I'd give a few overall impressions from <a href="http://cw.mtacon.com/schedule/city/washington"  title="CodeWorks DC">CodeWorks DC</a> while they're fresh in my mind.<br />
<br />
<h4>The community</h4><br />
What really impressed me was just how great the PHP community is. There were some Big Names there, but everybody was really approachable and happy to share what they knew and ready to listen to others. They were really friendly, and I had some great conversations in the hall and after hours, both with other attendees and with speakers and staff. Get a sense of this over at <a href="http://caseymultimedia.com/blog/code-works-2009-dc"  title="CaseyMultimedia photography">Dawn Casey's blog</a>.<br />
<br />
<h4>The tutorials</h4><br />
I had expected the tutorials to be somewhat interesting, but otherwise expected the meat to be on the second day with the more traditional talks.<br />
<br />
Wrong.<br />
<br />
The <a href="http://cw.mtacon.com/schedule/talk/code_review"  title="Ze Germans">code review</a> I attended in the morning was very educational, and Keith Casey was quite sporting about letting his project be <a href="http://twitter.com/CaseySoftware/status/4545557078"  title="Ze Germans blitz Web2Project">dissected by ze Germans</a>, as they came to be known. Best line: "Well, think of how many people are in this room, multiply it by our billing rate, and see how much it cost us just to figure out what the hell this piece of code does." But the <a href="http://cw.mtacon.com/schedule/talk/oop"  title="Advanced OOP">Advanced OO Design</a> talk was really valuable. The lower crowd size coupled with the length of the presentation made it very easy to ask substantive questions and get serious responses. It helped me get over a number of mental blocks I'd been having with the implementation of MVC in web apps and better ways to do Dependency Injection.<br />
<br />
None of this takes away from the second day's talks. I'll highlight some of them in coming blog posts. But the tutorials were an unexpected gem.<br />
<br />
<h4>Microsoft</h4><br />
Microsoft appears to be making a really big effort to reach out to the PHP community, and I appreciate it. They were a big sponsor of the event, including an open bar the second night. I also appreciate what they've been doing to improve PHP's performance on IIS. I hope they follow this effort up by taking steps to make themselves really interoperable with other systems, so it doesn't feel like going Microsoft is an all-or-nothing choice.<br />
<br />
<h4>The Organizers</h4><br />
Even though it was small enough to handle informally, CodeWorks felt very well-run. Despite a truly grueling schedule (two teams leapfrogging across the country, one day on, one day off), everybody seemed in good spirits and there was comparatively little confusion. When a mixup or a technical glitch occurred, they were able to adapt quickly, even ready to get a speaker to throw in an extra talk.<br />
<br />
If they decide to to this again, I highly recommend this conference. If they're in town again, I'm going to lobby to get the whole Forum One team there--it was really that good. 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/CO9f4CeM_yQ" height="1" width="1"/>]]></content:encoded>

    <pubDate>Mon, 05 Oct 2009 17:17:13 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/170-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/170-CodeWorks-09-DC.html</feedburner:origLink></item>
<item>
    <title>Datamasher Wins!</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/qPsDxRICsVY/168-Datamasher-Wins!.html</link>
            <category>Drupal</category>
    
    <comments>http://tech.forumone.com/archives/168-Datamasher-Wins!.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=168</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=168</wfw:commentRss>
    

    <author>nospam@example.com (Sandy Smith)</author>
    <content:encoded><![CDATA[
    In case you haven't gotten the news via Twitter or elsewhere, <a href="http://www.datamasher.org/">Datamasher</a> <a href="http://sunlightlabs.com/blog/2009/apps-america-winners/">won</a> in a squeaker, over some very stiff competition from <a href="http://www.thisweknow.org/">This We Know</a> and <a href="http://www.govpulse.us">GovPulse</a>. I got to meet and talk shop with those developers and the developers behind the Visualization Prize winner, <a href="http://www.quakespotter.org">QuakeSpotter</a>. They're all scarily smart and great people. Since the voting was incredibly close, I think it shows the entries were all really strong.<br />
<br />
A big thank-you to everyone who voted for Datamasher! 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/qPsDxRICsVY" height="1" width="1"/>]]></content:encoded>

    <pubDate>Wed, 09 Sep 2009 11:23:29 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/168-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/168-Datamasher-Wins!.html</feedburner:origLink></item>
<item>
    <title>Datamasher at the Gov 2.0 Expo Showcase</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/CrE4O2e2bh4/167-Datamasher-at-the-Gov-2.0-Expo-Showcase.html</link>
    
    <comments>http://tech.forumone.com/archives/167-Datamasher-at-the-Gov-2.0-Expo-Showcase.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=167</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=167</wfw:commentRss>
    

    <author>nospam@example.com (Sandy Smith)</author>
    <content:encoded><![CDATA[
    <a href="http://www.gov2expo.com/gov2expo2009" title="Vote for Datamasher at the Gov 2.0 Expo Showcase"><img src="http://assets.en.oreilly.com/1/eventprovider/1/gov2expo_showcase_logo_111.gif" alt="Gov 2.0 Expo Showcase" style="float: right; margin: .3em" /></a>Some of my <a href="http://www.forumone.com">Forum One</a> colleagues and I will be at the <a href="http://www.gov2expo.com/gov2expo2009">Gov 2.0 Expo Showcase</a> today to talk Gov 2.0 (duh) and present <a href="http://www.datamasher.com/">Datamasher</a>. If you're going, come by the Datamasher table and say hi, and pick up some <a href="http://bestuff.com/stuff/nerds">Nerds</a> or <a href="http://www.smarties.com/">Smarties</a>. 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/CrE4O2e2bh4" height="1" width="1"/>]]></content:encoded>

    <pubDate>Tue, 08 Sep 2009 06:33:18 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/167-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/167-Datamasher-at-the-Gov-2.0-Expo-Showcase.html</feedburner:origLink></item>
<item>
    <title>Datamasher: a Drupal-Based Data Visualization Tool</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/ujP5Hb6_dMw/165-Datamasher-a-Drupal-Based-Data-Visualization-Tool.html</link>
            <category>Drupal</category>
    
    <comments>http://tech.forumone.com/archives/165-Datamasher-a-Drupal-Based-Data-Visualization-Tool.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=165</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=165</wfw:commentRss>
    

    <author>nospam@example.com (Sandy Smith)</author>
    <content:encoded><![CDATA[
    <h3>Concept</h3><br />
<br />
<a href="http://www.datamasher.org/" title="Vote for Daatamasher!"><img src="http://influence.forumone.com/uploads/datamasher.gif" alt="Datamasher" style="float: right; margin: 4px" /></a>In <a href="http://tech.forumone.com/archives/163-Apps-for-America-2-Lessons-Learned-During-Speedy-Application-Development!.html">creating</a> <a href="http://www.forumone.com">Forum One's</a> entry into the <a href="http://www.sunlightlabs.com/contests/appsforamerica2/">Sunlight Labs Apps for America 2</a> competition, we were faced with a challenge: how to take some of the data cataloged on the government's new <a href="http://data.gov/">data.gov</a> website and make it more easily used and understood by average citizens. Much of the data is obscure and not easily understood by someone not already familiar with advanced statistical analysis and whichever field the data is about, such as economics, labor studies, agriculture, biology, or environmental science.<br />
<br />
Once we hit on the concept of taking state-by-state data and making it more available to people, we looked at what was out there to make sure we weren't reinventing the wheel. We were impressed by <a href="http://www.statemaster.com/">StateMaster</a>, which already ranked states by single data sets. Norman, a web developer, had the idea of letting users combine datasets and graph the results. That reminded me of the <a href="http://en.wikipedia.org/wiki/Misery_index_(economics)">Misery Index</a>, famously used by Jimmy Carter to bash Gerald Ford, and then used by Ronald Reagan to bash Jimmy Carter. The formula was simple: take the national unemployment rate plus the national inflation rate, and you have an indicator of the pressure being felt by working families.<br />
<br />
Initially, we considered a more complex service that would allow someone to create simple equations, such as (a + b) / (c * 2), but we realized getting the interface right would take a lot of time we didn't have. Additionally, we realized none of us were statisticians, and few of our target audience (average but web-savvy citizens) would be either. So doing something with mathematical and analytical rigor was out of the question. We decided instead to make the tool much more about discovery and discussion. The challenge of graphing 51 points also led us to lead with a map-based display. The time limitation meant we'd pare out everything that wasn't essential and polish what we had.<br />
<br />
In the end, we decided to let users create mashups of two data sets out of a repository of datasets we'd pre-load. Users would also discuss and rate other mashups. Since we wanted the site to be self-sustaining, we would allow users to add additional datasets so updated and additional data could be included.<br />
<br />
<h3>Components</h3><br />
<a href="http://www.sunlightlabs.com/blog/2009/apps-america-finalists/" title="Vote for Datamasher"><img src="http://dl-client.getdropbox.com/u/36193/High%20School%20Graduation%20vs%20Guns%20in%20Household%20%7C%20DataMasher.jpg" alt="Datamasher mashup" style="float: left; margin: 4px" /></a> The online community element led us naturally to use Drupal. This saved us having to build registration, commenting, pretty URL, and basic CMS features. We started with <a href="http://acquia.com/">Acquia Drupal</a> to give us a bunch of pre-screened modules we could use as we saw fit during development. We wanted a rating component to allow users to float good or interesting mashups to the top, so we used the <a href="http://drupal.org/project/fivestar">Fivestar</a> module, and enabled comments on the Mashup content type. To supply the datasets, we created a dataset content type, and used CCK nodereferences to connect them. To display the maps, we used a Flash map from <a href="http://fla-shop.com/">Fla-shop.com</a>, which we had worked with previously and knew could let us color states with XML and provide additional information in popups. To ensure the data was easier to scan, we created a second table view. To guard against spam, we enabled <a href="http://mollom.com/">Mollom</a>. To enable people to personalize their mashups with icons, we used <a href="http://drupal.org/project/imagecache">ImageCache</a> and a CCK Image field.<br />
<br />
<h3>Customization</h3><br />
Getting lots of lists of states plus data entered wasn't easy, and required some of us to comb through data.gov and other sources looking for state-level data to include. To facilitate this and make the combinations less database-intensive, Norman built out a module to take a CSV file in State Name, Value format, create a table for that data set in the database and store the data there, and then retrieve the appropriate table for its associated node, combine them with the appropriate operator, and provide an array. I wrote a module to take the table data from Norman's module, compute the color needed for each state, and format it in the XML schema required by the Flash-based map (which, among other things, required the states be in a fixed order).<br />
<br />
<div class="serendipity_imageComment_right" style="width: 493px; text-align: center; float: right; margin: 4px;"><div class="serendipity_imageComment_img"><img width='493' height='86'  src="http://tech.forumone.com/uploads/datmasher_operator.png" alt="" /></div><div class="serendipity_imageComment_txt">Datamasher: selecting an operator</div></div>To make it easier for people to create mashups, I themed the checkbox form element to use JQuery and formatted options to select the operator, which was the most confusing part of the default interface. Now users simply click on the operator with which they'd like to combine the two datasets, and see their choice in a very large font. Norman themed the mashup content type template, using Drupal 6's templating features to provide a tab for the map view and a tab for the table view.<br />
<br />
<a href="http://www.datamasher.org/node/106" title="Video: How to use Datamasher"><img width="260"  src="http://www.datamasher.org/sites/all/themes/indik8r_zen/images/datamasher.gif" style="float: right; margin: 4px" alt="How to use Datamasher video" /></a>We decided people would still like to look at maps and tables for each dataset, so we adapted the modules to provide the same display for those. And to deal with the inevitable carping over statistical rigor, we added a <a href="http://tr.im/vDfx">little surprise</a>. To let people more easily add future datasets, Norman created a user data set module with a custom form that displayed an entry for each state--all the user has to do is fill in each value and some metadata. Add in views for most recent, highest rated, and most discussed mashups and datasets, a view of latest comments, an instructional video, and then some dusting off of my Photoshop cutup and theming skills, and voila, in essentially three weekends we'd built a data visualization tool.<br />
<br />
<h3>Vote for Datamasher!</h3><br />
<br />
If you like it, please <a href="http://www.sunlightlabs.com/blog/2009/apps-america-finalists/" title="Vote for Datamasher!">vote for Datamasher</a>, by registering and voting at Sunlight Labs via that link. Today is the last day! 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/ujP5Hb6_dMw" height="1" width="1"/>]]></content:encoded>

    <pubDate>Mon, 07 Sep 2009 14:31:30 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/165-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/165-Datamasher-a-Drupal-Based-Data-Visualization-Tool.html</feedburner:origLink></item>
<item>
    <title>Apps for America 2: Lessons Learned During Speedy Application Development!</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/vMP5cliBBbQ/163-Apps-for-America-2-Lessons-Learned-During-Speedy-Application-Development!.html</link>
            <category>Drupal</category>
            <category>Open Source</category>
            <category>Social Software</category>
    
    <comments>http://tech.forumone.com/archives/163-Apps-for-America-2-Lessons-Learned-During-Speedy-Application-Development!.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=163</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=163</wfw:commentRss>
    

    <author>nospam@example.com (Michaela Hackner)</author>
    <content:encoded><![CDATA[
    Since many of us are involved in campaign-focused work that requires rapid turn-around, I wanted to share some lessons from a recent internal project we delivered in 4 weeks for the "Apps for America 2" contest. <br />
<br />
(Our application, DataMasher, placed in the top 3 (out of 47), so by they way, I'd appreciate your <a href="http://influence.forumone.com/archives/382-Vote-for-DataMasher-in-Apps-for-America-2.html" >vote</a> so we can be pushed to #1.)<br />
<br />
First some background: The contest was created by Sunlight Labs to celebrate and publicize <a href="http://data.gov" >data.gov</a>, a new resource for federal government data. We were given 11 weeks to work on it, and we actually completed the entire application in 4 weeks from kickoff to launch, in less than 200 hours. We spent a few weeks brainstorming in June, but the bulk of our work happened during the last 4 weeks. At times we weren't sure we would finish in time, but we really believed in our idea to make government data usable, visual, and accessible. So, we persevered!<br />
<br />
Here's are a few lessons we captured that should be applicable to similar projects:<br />
<br />
1. Keep the team small. Our team was only 5 people - a Senior Advisor, a Project Manager, a Tech Lead, a Developer, and an Information Architect/Designer. This focused the scope and increased our overall productivity.<br />
<br />
2. Choose a few pieces of key functionality and ROCK them! Although the possibilities were/are endless with DataMasher.org, we tempered our expectations and were practical with our decisions. We wanted to ensure that the features we built into the site worked really well and that we'd have time to test and tweak. We also wanted to ensure that the site would be flexible enough for growth in the future. There were times we had to turn down great ideas because we weren't sure we'd nail them in the time we had left, but we kept a running tally of enhancements to develop in the future, and continue to seek out that feedback from users (including you!).<br />
<br />
3. Leverage user-generated content whenever possible and appropriate: many heads are better than one!  DataMasher is by "the people" and "for the people". We wanted the site to be about the users and their data, and most importantly, the ways in which users could manipulate that data to be relevant. Letting people create their own mashups, rank and rate them, add comments, and upload new data sets was critical to our overall goal.<br />
<br />
4. Be flexible and keep moving - don't get caught up in the churn and debate, make decisions! If we had spent a lot of time planning and scoping, we never would have entered into development. We chose basic goals, met weekly to discuss progress and opportunities, and were always willing to both succeed and fail, and most importantly, learn.<br />
<br />
The project was a ton of fun to work on, if not a lot of work.  I hope these insights are helpful.<br />
<br />
Once again, if you wish to vote for DataMasher, <a href="http://bit.ly/datamasher" >here's how</a>.<br />
 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/vMP5cliBBbQ" height="1" width="1"/>]]></content:encoded>

    <pubDate>Fri, 28 Aug 2009 14:01:19 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/163-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/163-Apps-for-America-2-Lessons-Learned-During-Speedy-Application-Development!.html</feedburner:origLink></item>
<item>
    <title>WordPress: Certain Widgets on Certain Pages</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/qz7Ft28ZAd4/161-WordPress-Certain-Widgets-on-Certain-Pages.html</link>
            <category>Content Management</category>
            <category>Drupal</category>
            <category>Open Source</category>
            <category>PHP</category>
    
    <comments>http://tech.forumone.com/archives/161-WordPress-Certain-Widgets-on-Certain-Pages.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=161</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=161</wfw:commentRss>
    

    <author>nospam@example.com (Matt Gibbs)</author>
    <content:encoded><![CDATA[
    WordPress and Drupal are similar in a lot of ways. They're both extremely popular, powerful, and flexible <strong>frameworks</strong>. They both have minimal cores, but were built from the ground-up to handle tons of extensibility.<br />
<br />
Even though WordPress has been traditionally thought of as a blogging system, it's gradually shaping into a more refined, full-featured CMS. WordPress Plugins like <a href="http://pods.uproot.us/" target="_blank" title="Pods CMS">Pods CMS</a> and <a href="http://flutter.freshout.us/" target="_blank" title="Flutter">Flutter</a> are opening the flood gates of potential, just like how the <a href="http://drupal.org/project/cck" target="_blank" title="CCK">CCK</a> and <a href="http://drupal.org/project/views" target="_blank" title="Views">Views</a> modules have revolutionized Drupal.<br />
<br />
<h3>Drupal - Blocks</h3><br />
Drupal includes things called "Blocks", which are chunks of code/HTML that you can stick in various "regions" of your site (e.g. Header, Footer, Content Top, etc). With blocks, you can choose which pages these blocks appear on, or which pages to exclude them from appearing on.<br />
<br />
<h3>WordPress - Widgets</h3><br />
WordPress has similar things called "Widgets". The main thing missing with Widgets as opposed to Blocks is the ability to display specific Widgets on specific pages. Regardless, Widgets are relatively simple to implement.<br />
<br />
You first add some PHP code in <strong>functions.php</strong> to define new "regions" to place widgets into.<br />
<br />
<div style="padding:10px; background: #f1f6fb; border: 1px dashed #235587">&lt;?php<br />
if (function_exists('register_sidebar')) {<br />
  register_sidebar(array(<br />
    'name'=>'My Footer',<br />
    'before_widget' => '',<br />
    'after_widget' => '',<br />
    'before_title' => '&lt;h4>',<br />
    'after_title' => '&lt;/h4>'<br />
  ));<br />
}</div><br />
<br />
Then, it's a matter of adding some code to your WP Template file (e.g. index.php) to display this custom Widget region:<br />
<br />
<div style="padding:10px; background: #f1f6fb; border: 1px dashed #235587">&lt;?php dynamic_sidebar('My Footer'); ?></div><br />
<br />
<h3>WordPress Plugin: Widget Block</h3><br />
I created a plugin so that you can treat WordPress widgets more like Drupal blocks. Specifically, you can <strong>choose which pages a certain widget will appear on</strong> (or be excluded from). This plugin also prevents you from needing to create many <em>slightly different</em> Widget regions. The plugin is called <a href="http://wordpress.org/extend/plugins/widget-block/" target="_blank" title="Widget Block">Widget Block</a>; give it a try!<br />
<br />
<img src="http://imgur.com/QqNRA.png" alt="Widget Block" /> 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/qz7Ft28ZAd4" height="1" width="1"/>]]></content:encoded>

    <pubDate>Fri, 10 Jul 2009 10:31:29 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/161-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/161-WordPress-Certain-Widgets-on-Certain-Pages.html</feedburner:origLink></item>
<item>
    <title>The Cloud: how is it relevant?</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/tl1F2ZWN6g0/160-The-Cloud-how-is-it-relevant.html</link>
            <category>Hosting</category>
    
    <comments>http://tech.forumone.com/archives/160-The-Cloud-how-is-it-relevant.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=160</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=160</wfw:commentRss>
    

    <author>nospam@example.com (Jo Ryden)</author>
    <content:encoded><![CDATA[
    <img width="200" height="125" style="border: 0px none ; float: right; padding-left: 5px; padding-right: 5px;" src="http://tech.forumone.com/uploads/2Color_Business_Partner.serendipityThumb.png" /><p><font size="3"><b>I</b></font> attended the <a href="http://nten.org/ntc" target="_blank">Nonprofit Technology Conference</a> in San Francisco a couple of weeks ago. As in so many other places these days, both on and offline, a lot of the buzz and talk was centered around The Cloud and Cloud Computing. What is it? What can it do for us? Who uses it? It's easy to get into long discussions about these topics and there are many articles, blog posts and even <a href="http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Daps&field-keywords=cloud+computing&x=0&y=0" target="_blank">books</a> covering a wide array of aspects and philosophies of Cloud Computing. I'll try to give a very brief and cursory overview below in an attempt not to cause immediate information overload. If you would like to continue the discussion a bit more in-depth, please feel free to leave a comment or contact me at any time.</a> </p><br />
<h4><em>What is it?</em></h4><hr width="100%" size="2" /><p><font size="3"><b>T</b></font>here are still quite extensive (and sometimes heated...) debates going on regarding how to define The Cloud and services operating from The Cloud. I'm a visual person and I think this video is a good attempt at depicting The Cloud, what it is and where it came from. </p><center><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/XdBd14rjcs0&hl=en&fs=1&rel=0" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed width="425" height="344" src="http://www.youtube.com/v/XdBd14rjcs0&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" /></object></center><b><font size="3">A</font></b> few highlights: <p><ul><li>A collection of shared, internet accessible resources or infrastructure evolved from several "as a Service" infrastructure and software delivery models</li><li>Can be tapped into on an as-needed basis (resources can be scaled up or down with little to no effort)</li><li>Pay for the resources you use, and don't pay for what you don't use (utility type metered billing model)</li><li>&quot;Open&quot; philosophy (open meaning access from any device anywhere at a higher level and <a href="http://en.wikipedia.org/wiki/API">API</a> access at a lower level)</li></ul></p><font size="3"><b>S</b></font>ome people like to argue that with the evolution of The Cloud, the various "as a Service" concepts have become obsolete. I don't necessarily subscribe to that view. To use a familiar example: Google Apps (GA). GA is what has traditionally been categorized as <em>Software as a Service</em> (SaaS), and I think that is still the most accurate description of what it is. However, since GA runs off The Cloud you could make the argument that it should be called a Cloud [based] Service.</p><h4><em>What can it do for us?</em></h4><hr width="100%" size="2" /><p><font size="3"><b>B</b></font>esides the obvious and immediate cost savings associated with life in The Cloud, it also offers a level of flexibility in a number of areas that is previously unparalleled in the computing world:<ul><li>No more long binding hardware/hosting contracts</li><li>Need a staging site for that one new application to show off for an afternoon? No problem, just click a button</li><li>Have a high profile campaign driving a lot of traffic to your web site? Deploy some extra resources for the duration of the campaign effect and terminate them at will as soon as your traffic returns to normal levels</li><li>Need some compelling arguments when presenting and/or defending your web operations budget? How about: no longer will you be spending on what you <em>might</em> need, you are now spending on what you in <em>actuality</em> need and use</li></ul></p><p><font size="3"><b>S</b></font>o what's the catch? There really is no catch to speak of. The barrier of entry to The Cloud is very low, cost is exclusively operational as opposed to in previous years where the barrier of entry to high level computing resources has been associated with large upfront capital expenditures.</p><h4><em>Who uses it?</em></h4><hr width="100%" size="2" /><p><font size="3"><b>C</b></font>hances are you as an individual or maybe in some business capacity, are already taking advantage of what The Cloud has to offer in some way or another without even knowing about it, which is coincidentally one of the major characteristics of The Cloud; the abstraction of the underlying infrastructure, hardware or software platform. I mentioned Google Apps above, here are some other major players using The Cloud and/or providing access to it and services running from it: <ul><li><a href="http://www.salesforce.com/" target="_blank">Salesforce.com</a> - provides cloud services</li><li><a href="http://aws.amazon.com/" target="_blank">Amazon.com</a> - provides cloud services and cloud infrastructure (which have evolved from an infrastructure that mainly came about due to its own need for an operating platform for its e-commerce business)</li><li><a href="http://www.razorfish.com/" target="_blank">Razorfish.com</a> - operates from The Cloud</li></ul><font size="3"><b>T</b></font>he distinction between who "uses" the cloud and who provides access to cloud infrastructure and services can sometimes be a little fuzzy since providers are oftentimes middle men and end users as well, and vice versa. </p><h4><em>Final words</em></h4><hr width="100%" size="2" /><p><font size="3"><b>A</b></font>t Forum One we offer our clients and partners a slice of, and a guided way into, The Cloud and all of the benefits discussed above through our partnership with Rackspace and its <a href="http://www.mosso.com/index.jsp" target="_blank">Cloud Division</a>. We also have several SaaS offerings (or Cloud Service offerings if you will), our flagship being <a href="http://www.projectspaces.com/" target="_blank">ProjectSpaces</a>. The Cloud isn't just the future of computing, it is here <em>now</em> and ready for you to put to use!</p> 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/tl1F2ZWN6g0" height="1" width="1"/>]]></content:encoded>

    <pubDate>Wed, 06 May 2009 14:02:08 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/160-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/160-The-Cloud-how-is-it-relevant.html</feedburner:origLink></item>
<item>
    <title>LegiStalker: Getting people engaged with Congress</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/S5KHRbJYNDM/159-LegiStalker-Getting-people-engaged-with-Congress.html</link>
            <category>Open Source</category>
            <category>Tools</category>
    
    <comments>http://tech.forumone.com/archives/159-LegiStalker-Getting-people-engaged-with-Congress.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=159</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=159</wfw:commentRss>
    

    <author>nospam@example.com (Matt Gibbs)</author>
    <content:encoded><![CDATA[
    There's a lot of people out there wanting to keep up with Congress.<br />
<br />
Many people just want to know what their representatives are doing in Congress, how they're voting, and who they're interacting with. Unfortunately, that's pretty hard to find, especially from several different angles.<br />
<br />
We at Forum One felt that exposing this information was a pretty good idea, so we ran with it. The final result is the site <a href="http://legistalker.org/"  title="LegiStalker">LegiStalker</a>.<br />
<br />
From the low level, it's a pretty simple concept. We pull in all the information we can find about every Congressperson, clean it up, and store it in an ever-growing database. So far, we've managed to harness YouTube, Twitter, latest voting data, and several hundred different news sources. With so many different news sources, there's a pretty good spectrum of differing perspectives -- ranging from CNN and the New York Times to Fox News.<br />
<br />
This is a lot of good information, but a lot of information nonetheless. If users are presented with just the latest items retrieved, it would get pretty overwhelming for the user. With that in mind, we came up with a 5-tiered system for filtering the data to meet any user's needs.<br />
<br />
1. <a href="http://legistalker.org/"  title="U.S. Level">U.S. Level</a> - a high-level view with the latest feeds from any congress member.<br />
<br />
2. <a href="http://legistalker.org/places/NC"  title="State Level">State Level</a> - When the user clicks on a state, it first displays all representatives in that state. All the tabs now display feeds relating only to congress members in that state.<br />
<br />
3. <a href="http://legistalker.org/places/90210"  title="Zip Code Level">Zip Code Level</a> - When the user enters their zip code in the box, all their Congress representatives will first appear. This will include the two senators, as well as one or more representatives. All the tabs now display feeds relating only to those people listed.<br />
<br />
4. <a href="http://legistalker.org/people/M001147"  title="Detail Level">Detail Level</a> - At this level, the congressperson's contact information is displayed. In addition to News, YouTube, and Twitter, that person's most spoken Congress words are displayed in the new "Capitol Words" tab, and there is also a history of that person's latest votes. All the other tabs are filtered to that single person in question.<br />
<br />
5. <a href="http://legistalker.org/following"  title="Watch List Level">Watch List Level</a> - When users are viewing a congressperson's detail page, they have the option to add that person to their "Watch List". When they do, that person is displayed in the "My Watch List" area at the top right corner of the site. An unlimited number of people can be added to someone's watch list. <strong>This allows users to filter content based only on representatives that they want to keep track of</strong>.<br />
<br />
Adding this much fine-tuning was quite some work, but we feel that it's worth it. Visitors can now keep track of who they want to keep track of, thus making more informed decisions.<br />
<br />
Although the <a href="http://sunlightlabs.com/blog/2009/04/20/and-winners-are/"  title="Apps for America">Apps for America contest</a> is over, we'll definitely keep adding more features to pry open the doors between congresspeople and their constituents. 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/S5KHRbJYNDM" height="1" width="1"/>]]></content:encoded>

    <pubDate>Sun, 26 Apr 2009 15:27:09 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/159-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/159-LegiStalker-Getting-people-engaged-with-Congress.html</feedburner:origLink></item>
<item>
    <title>Code Samples, Job Applications, and You</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/C4PtW-LctmI/156-Code-Samples,-Job-Applications,-and-You.html</link>
            <category>Programming</category>
    
    <comments>http://tech.forumone.com/archives/156-Code-Samples,-Job-Applications,-and-You.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=156</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=156</wfw:commentRss>
    

    <author>nospam@example.com (Sandy Smith)</author>
    <content:encoded><![CDATA[
    According to a couple of sources I've checked out recently, code samples are rare in the software development interviewing process. <a href="http://ask.slashdot.org/article.pl?sid=06/12/14/0511224"  title="One discussion">One discussion</a> was full of responses calling the idea ridiculous and suggesting candidates cancel interviews at places that request a code sample. I think they're incredibly wrong. I think code samples are a great idea, and I'm going to not only tell you why, but give you tips on amateur mistakes to avoid if you want to be taken seriously.<br />
<br />
<h3>You can't tell that much about a person from a code sample</h3><br />
That's right, and that's wrong. It's right in that many commenters calling a company "stupid" for "relying" on code samples assume there's no other criteria to hiring. Code samples are actually one of several initial screening devices I use to cut out people who aren't going to work out. At every stage in the game, I'm looking for something to tell me--before committing a lot of money and diverting a lot of other people's time to bring you on board--whether you're likely to be the sort of programmer we're looking for. This doesn't mean you're a bad programmer if we don't hire you; it just means that who you are and where you are as a programmer doesn't match our culture and our needs, and likely our culture and opportunities won't be a great fit for you, either.<br />
<br />
Of course, if I like a code sample, there are still interviews, references, and some discussion of real and example code. We still care very much as to whether you know our technology, can work well on a team, are comfortable working with policy nonprofits, and several other factors that go into a hiring decision.<br />
<br />
Then again, I can tell a lot about a person from their code. Are they consistent? Do their variable names follow a pattern? Do they have a coding style and stick to it? Basically, do they write code to be read by others, or assume they'll always know what they meant and code for themselves in the moment? Do they follow contemporary idioms for the programming language the code sample is in? Is the code filled with convoluted ways of solving simple problems? Is there anything clever, and is it in service of the problem or just adding complexity to make the solution more interesting to create? Is the code from an open source project? Have they collaborated with others? Do they follow good habits, even on personal projects? Is it well laid out or look like a quick hack?<br />
<br />
<h3>But you don't even know it's the person's own code!</h3><br />
Yeah, I do. I mean, not immediately on first glance, but there should be some correspondence between the level of sophistication in the code and the work history on the resume. Rarely have I gotten a sample so perfect I wonder if the programmer wrote it themselves. And even if they stole the code, whether they have the sense to steal a Renoir or a Kinkade also tells me something. I mean, if you can't even steal good code, I can safely pass on to the next application.<br />
<br />
If, during an interview, I get an impression that's at odds with the code sample I've seen, I can always ask about it. It's tough to fake familiarity with a piece of code you grabbed off a server somewhere. If the code uses design patterns, I ask about them. If it doesn't, I ask why not. I ask about the tradeoffs in using a given pattern versus not using one. I'll usually ask these sorts of questions anyway, so I get a sense of where the programmer is in thinking about code as well as writing it.<br />
<br />
<h3>But maybe my code is all proprietary or even classified!</h3><br />
The code you write at work is, but there's no reason you can't write out part of a common solution. We're also an open source shop, so you can always write a plugin or extend an open source app. If you need a few days to get a sample together, I'll understand, but hey, if you're going to apply for programming positions, you shouldn't be surprised if they want to see samples of your work. This is a problem long ago dealt with in other aspects of your profession: strategists will be asked to provide writing samples and designers will be asked for samples of their portfolio. Programming isn't a job you tend to hold onto for decades; you should have a sample ready. I have always had current samples since I became a programmer.<br />
<br />
<h3>OK, so what should I provide?</h3><br />
Above all, something you're proud of, or at the very least feel is a good representation of where you are as a programmer. This does not mean the cleverest thing you've ever done (frequently the cleverest thing a programmer does is not the best thing a programmer does). It can be a whole program or just a part of one. It should be more than one screenful of code--I need enough to see patterns.<br />
<br />
In a way, it's like the various cooking competitions that are all the rage now (go <a href="http://www.fansofrealitytv.com/forums/top-chef-new-york/78504-carla-top-chef-new-york.html#post3221053">Carla</a>!). These chefs have a body of work and produce pieces of dishes many times each lunch and dinner (or even breakfast). But the finale comes down to whether they produced a great meal that represents them as a creative artist. And, like food, programming is a mix of artistry and engineering.<br />
<br />
<h3>So...what should I not provide?</h3><br />
Thanks for asking--because I rarely worry about stolen code when I see so much bad stuff given to me as representative of a programmer.<br />
<h4>Don't indulge your bad habits</h4><br />
Anybody who gets out of a programming 101 class knows good programmers comment their code. There are arguments about how much or how little, but there's a reason almost every code-completing IDE also generates comment templates for you. We all slack off sometimes (admit it), but the time to do it is not when you're sending me code that's going to help me determine whether or not to bring you in for an interview.<br />
<br />
Likewise, giving me code with obvious XSS or SQL injection vulnerabilities is probably not a good idea. Even if you're writing a toy app to demonstrate a few techniques, the fact that you code without basic filtering and validation is going to make me nervous that you'll do it when there's a project manager asking you if there's any way you can add a couple of more client requests by the deadline. Sure, it's the kind of thing non-technical people aren't going to notice or praise you for, but they will curse you when their site around sensible regulations for underwater basket weaving curricula is replaced with pr0n.<br />
<br />
<h4>Don't be weird</h4><br />
I see some really odd constructions. If you think the rest of the universe is wrong about most things about programming in a given language and you're going to prove them wrong and stun me with your brilliance in a single code sample, you're basically doomed. I'm looking to see if you're aware of best practices going on in the wider world around you (do you read any programming blogs? articles on your language?). I'm also looking to see if you think about problems in a way that makes sense to most people. In our organization at least, everybody is going to work on someone else's code at some point. Wrapping a static HTML block inside a PHP include that contains a Javascript function to print out each line of HTML is not the kind of innovation that I'm looking for. Save it for the <a href="http://www.ioccc.org/">obfuscated C competition</a>. Don't laugh; I've seen that.<br />
<br />
<h4>Don't give me the same code sample you used six years ago</h4><br />
I'm looking to see what you're like now. If you haven't really progressed in six years, then, OK. I've still got the PHP 4 samples lying around. Heck, I've even got the Perl CGI flat-file database I used when I interviewed here. They're probably not my best chance to prove to you that I know what I'm doing now. Likewise, don't give me HTML 4 table-based layouts with nested function calls that assumes <code>register_globals</code> is on.<br />
<br />
Remember, all of this--at least in my case--is not to prove you're the most brilliant programmer that ever walked the face of the earth. I'm not actually interested in hiring that person. I'm interested in a really good programmer who works well with others, can be put in front of someone non-technical, and who can easily pick up our idioms and have positive contributions of their own. So don't overthink the code sample, but don't put less thought and care into it than you do how you dress for the interview. Neither will get you the job by themselves, but both of them can either keep you from getting the job you want or make a good impression you can confirm throughout the interview process. 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/C4PtW-LctmI" height="1" width="1"/>]]></content:encoded>

    <pubDate>Mon, 09 Mar 2009 23:16:15 -0400</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/156-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/156-Code-Samples,-Job-Applications,-and-You.html</feedburner:origLink></item>
<item>
    <title>DrupalCon DC</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/hbk0x9rhz0M/155-DrupalCon-DC.html</link>
    
    <comments>http://tech.forumone.com/archives/155-DrupalCon-DC.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=155</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=155</wfw:commentRss>
    

    <author>nospam@example.com (Matt Gibbs)</author>
    <content:encoded><![CDATA[
    Hey everyone, just a heads up that the whole Tech Team will be attending <a href="http://dc2009.drupalcon.org/"  title="DrupalCon DC">DrupalCon DC</a> from March 4 - 7. "DrupalCon is the official Drupal unconference that attracts the most talented open source developers and innovative web shops in the world and brings them together to share knowledge, make decisions on the future of Drupal, and get to know each other in person". If you're also attending, feel free to stop by our booth if you want to chat or know more about us.<br />
<br />
We hope to see you there! 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/hbk0x9rhz0M" height="1" width="1"/>]]></content:encoded>

    <pubDate>Wed, 04 Mar 2009 07:10:46 -0500</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/155-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/155-DrupalCon-DC.html</feedburner:origLink></item>
<item>
    <title>What is a Content Type?</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/gFvn1KcCVso/154-What-is-a-Content-Type.html</link>
    
    <comments>http://tech.forumone.com/archives/154-What-is-a-Content-Type.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=154</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=154</wfw:commentRss>
    

    <author>nospam@example.com (Matt Gibbs)</author>
    <content:encoded><![CDATA[
    A "Content Type" is jargon for what is a simple programming concept. I've been asked this question many times over the years, and hopefully this post will cut through the obscurity once and for all.<br />
<br />
Document. Event. News Article. Staff Member. These are all examples of Content Types.<br />
<br />
Which input fields would you expect to see when adding a new <strong>Staff Member</strong>? You'd probably want "First Name", "Last Name", "Date of Birth", "Phone Number", "Active Projects", etc. For Events, you'd likely want "Event Title", "Start Date", "End Date", "Location", and "Contact Name". The fields serve to describe the item, and any field(s) can be added to or removed from a content type.<br />
<br />
That's it. <strong>A content type is the term for a "bucket" of input fields.</strong> All items marked as "Events" share the same fields. If you add a new input field to the "Event" content type, then all current (and future) Event items will have that new field, too. Pretty simple, huh?<br />
<br />
The real power of content types isn't the categorization alone. Since all this information is now nicely structured within these content types, it's a whole lot easier to <em>form relationships</em> among different items. Remember that "Contact Name" field in the "Event" content type? A developer could easily set that field to pull in all staff members (items belonging to the "Staff Member" content type) and allow the user to select which staff members to use.<br />
<br />
Many modern CMS platforms (<a href="http://drupal.org/"  title="Drupal">Drupal</a>, <a href="http://pods.uproot.us/"  title="Pods">Pods</a>, <a href="http://www.syntaxcms.org/"  title="SyntaxCMS">SyntaxCMS</a>) allow developers to easily add and configure new content types without touching a line of code. 
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/gFvn1KcCVso" height="1" width="1"/>]]></content:encoded>

    <pubDate>Tue, 06 Jan 2009 15:42:00 -0500</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/154-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/154-What-is-a-Content-Type.html</feedburner:origLink></item>
<item>
    <title>Drupal module and theme naming collisions</title>
    <link>http://feedproxy.google.com/~r/ForumOneTechBlog/~3/0keYM-IB4fI/152-Drupal-module-and-theme-naming-collisions.html</link>
    
    <comments>http://tech.forumone.com/archives/152-Drupal-module-and-theme-naming-collisions.html#comments</comments>
    <wfw:comment>http://tech.forumone.com/wfwcomment.php?cid=152</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://tech.forumone.com/rss.php?version=2.0&amp;type=comments&amp;cid=152</wfw:commentRss>
    

    <author>nospam@example.com (William Hurley)</author>
    <content:encoded><![CDATA[
    As good as Drupal is, as many third-party enhancements there are, there usually comes a time when they just aren't quite enough.  The answer to that is to create your own module that does exactly what you or your client needs.  And since they are for a particular site the natural inclination is to name them after that site.  Similarly when developing a theme for a site the natural inclination is to name the theme for the site.  This, unfortunately, is a Very Bad Thing (TM).  For why this is let's take a quick look at where the configuration for modules and themes ends up, the system table.<br />
<br />
A quick export shows us the following:<br />
<pre><br />
CREATE TABLE `system` (<br />
  `filename` varchar(255) NOT NULL default '',<br />
  `name` varchar(255) NOT NULL default '',<br />
  `type` varchar(255) NOT NULL default '',<br />
  `description` varchar(255) NOT NULL default '',<br />
  `status` int(11) NOT NULL default '0',<br />
  `throttle` tinyint(4) NOT NULL default '0',<br />
  `bootstrap` int(11) NOT NULL default '0',<br />
  `schema_version` smallint(6) NOT NULL default '-1',<br />
  `weight` int(11) NOT NULL default '0',<br />
  PRIMARY KEY  (`filename`),<br />
  KEY `weight` (`weight`)<br />
)<br />
</pre><br />
<br />
The important rows are filename, which holds the file included for the module or the stylesheet displayed for the theme; name, which holds the name of the module or theme; type which is either module or theme; and description which holds the description of the module or the path to the templating engine for themes.  While I could take a slight detour to talk about why this structure is a bad idea (hint, it involves using the same column to mean two different things -- bad, Drupal, bad), it only partly contributes to our problem.<br />
<br />
When the theme and module have the same name and a user goes to the theme administrative section it updates all rows in the system table with the name of the theme to have the correct filename and description/templating engine.  It, however, does not check for the type.  So when it finds the module with the same name it overwrites it.  So you end up with a row that has a type of module but has the filename of a CSS file, and when the system goes to include all modules that are active it grabs the CSS and you end up with it output at the very top of the page.  Oh, and any functionality that your module provided no longer works.<br />
<br />
So the moral of the story is don't name themes and modules the same.  
    <img src="http://feeds.feedburner.com/~r/ForumOneTechBlog/~4/0keYM-IB4fI" height="1" width="1"/>]]></content:encoded>

    <pubDate>Fri, 12 Dec 2008 11:33:58 -0500</pubDate>
    <guid isPermaLink="false">http://tech.forumone.com/archives/152-guid.html</guid>
    
<feedburner:origLink>http://tech.forumone.com/archives/152-Drupal-module-and-theme-naming-collisions.html</feedburner:origLink></item>

</channel>
</rss>
