<?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>solidcode</title>
	<atom:link href="http://solidcode.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://solidcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 12 Jul 2011 18:27:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The Rainmaker API Challenge</title>
		<link>http://solidcode.com/2011/06/the-rainmaker-api-challenge/</link>
		<comments>http://solidcode.com/2011/06/the-rainmaker-api-challenge/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 13:19:03 +0000</pubDate>
		<dc:creator>Neil Simon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solidcode.com/?p=2709</guid>
		<description><![CDATA[On May 26th, I saw a tweet that piqued my interest: Rainmaker, a local startup, was announcing a month-long API Challenge for their new web service. The challenge: Build Something Cool! (along with a chance to win some fabulous prizes) But what&#8217;s the API all about? Basically, you provide an email address to their API, [...]]]></description>
			<content:encoded><![CDATA[<p>On May 26th, I saw a tweet that piqued my interest:</p>
<p><img src="http://solidcode.com/wp-content/uploads/2011/06/tweet-300x120.png" alt="" width="300" height="120" border="1" class="aligncenter size-medium wp-image-2719" /></p>
<p><a href="http://rainmaker.cc/" target="_blank">Rainmaker</a>, a local startup, was announcing a month-long <a href="http://rainmaker.cc/challenge/" target="_blank">API Challenge</a> for their new web service.</p>
<p>The challenge: Build Something Cool!  <i>(along with a chance to win some fabulous prizes)</i></p>
<p>But what&#8217;s the API all about? Basically, you provide an email address to their API, and Rainmaker returns a rich set of contact information.</p>
<p>I took a quick browse of their contest page, saw the <a href="http://api.rainmaker.cc/" target="_blank">API</a> and some examples, and immediately started thinking about something to build.</p>
<p>Today, I&#8217;m officially releasing my contest app:<br />
<b>The RainmakerMoxie Interactive WordPress Plugin.</b></p>
<p>How it works:<br />
1) Enter an email address to lookup.<br />
2) Available contact info for that email address appears in the sidebar: photo, contact information, interests, social profiles and links, tweets, and Plancast plans.</p>
<p>Highlights:<br />
&bull; Configurable to show 1-20 most recent tweets.<br />
&bull; Configurable to show 1-20 most recent Plancast plans.<br />
&bull; Setup is internationalized for Chinese, German, Italian, and Spanish.<br />
&bull; Mashup API&#8217;s include <a href="http://sendgrid.com/" target="_blank">SendGrid</a>, <a href="http://twitter.com/" target="_blank">Twitter</a>, and <a href="http://plancast.com/" target="_blank">Plancast</a>.</p>
<p>The Plugin can be downloaded from the <a href="http://wordpress.org/extend/plugins/rainmakermoxie/" target="_blank">WordPress hosted Plugin page</a>.</p>
<p>The Plugin source code is located at the <a href="http://plugins.svn.wordpress.org/rainmakermoxie/tags/1.1.4/" target="_blank">WordPress hosted SVN repository</a>.</p>
<p>Faithfully submitted, Neil Simon</p>
]]></content:encoded>
			<wfw:commentRss>http://solidcode.com/2011/06/the-rainmaker-api-challenge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Program that Delivers SendGrid Account Stats to a Phone Call</title>
		<link>http://solidcode.com/2011/06/sendgrid-stats-to-phone-call/</link>
		<comments>http://solidcode.com/2011/06/sendgrid-stats-to-phone-call/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 06:01:04 +0000</pubDate>
		<dc:creator>Neil Simon</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://solidcode.com/?p=2626</guid>
		<description><![CDATA[Recently I created a SendGrid account to learn more about their email delivery service. They have an extensive API, and I decided to write a program on my Linux box that retrieves several of my daily SendGrid email statistics (email request count, email delivered count, and invalid email address count) and sends them to my [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I created a <a href="http://sendgrid.com" target="_blank">SendGrid</a> account to learn more about their email delivery service. They have an <a href="http://sendgrid.com/documentation/display/api/Web" target="_blank">extensive API</a>, and I decided to write a program on my Linux box that retrieves several of my daily SendGrid email statistics (<b>email request count</b>, <b>email delivered count</b>, and <b>invalid email address count</b>) and sends them to my phone as a text-to-speech message.</p>
<p>From the command line, this is the syntax to run it:<br />
<code style="font-size:1.15em;"><b>$ /SendGrid/sgstats2phone.php 3034029500 nsimon@solidcode.com <i>MySecretApiKey</i></b></code></p>
<p>It calls my phone and delivers a text-to-speech message similar to this:<br />
<code style="font-size:1.15em;"><b>"send grid stats for nsimon at solidcode dot com May 10th 2011.</b></code><br />
<code style="font-size:1.15em;"><b>&nbsp;requests 44, delivered 43, invalid 1. Thank you, good bye."</b></code></p>
<p>I scheduled a cron job to deliver the stats at 8:00pm every evening:<br />
<code style="font-size:1.15em;"><b>00 20 * * * /SendGrid/sgstats2phone.php 3034029500 nsimon@solidcode.com <i>MySecretApiKey</i></b></code></p>
<p>App note: requires cURL, the Client URL Request Library. On my Ubuntu system, I installed cURL with this command:<br />
<code style="font-size:1.15em;"><b>$ sudo apt-get install php5-curl</b></code></p>
<p>If you&#8217;re a SendGrid developer, I hope you find this helpful.</p>
<p><span style="font-size:.85em; vertical-align:5%;"><a href="https://github.com/nsimon/sgstats2phone" target="_blank">Download the code</a></span><br />
&nbsp;</p>
<pre>
#!/usr/bin/php
&lt;?php

/******************************************************************************/
/* Module ..... sgstats2phone.php                                             */
/* Author ..... Neil Simon                                                    */
/* Modified ... 06/07/2011                                                    */
/* Desc ....... Delivers SendGrid account stats to a phone call               */
/* Usage ...... sgstats2phone.php {phone} {username} {api_key}                */
/******************************************************************************/

/******************************************************************************/
/* Include classes                                                            */
/******************************************************************************/

require_once ("CommandLine.php");
require_once ("SendGrid.php");
require_once ("SendGridCurl.php");

/******************************************************************************/
/* main                                                                       */
/******************************************************************************/

main ($argc, $argv);

function main ($argc, $argv)
    {
    // Reset to 0 upon success
    $rc = 1;

    // 3 args (+progname) required
    if ($argc != 4)
        {
        usage ();
        printf ("ERROR: 3 args required.\n");
        }

    else
        {
        // Store args
        $commandLine = new CommandLine_sgstats2phone ($argc, $argv);

        // Extract args
        $commandLine->extractArgs ();

        // Validate args
        if (($argStatus = $commandLine->validateArgs ()) != 0)
            {
            usage ();
            $commandLine->printArgErrorMessage ($argStatus);
            }

        else
            {
            // Store the args in the sendGrid object
            $sendGrid = new SendGrid ($commandLine->argPhone,    // 3034029500
                                      $commandLine->argUser,     // nsimon@solidcode.com
                                      $commandLine->argApiKey);  // MySecretApiKey

            // Get the SendGrid stats for the current day (via REST/XML)
            if ($sendGrid->statsGet () != 0)
                {
                printf ("ERROR: sendGrid->statsGet()\n");
                }
            else
                {
                // Assemble the text-to-speech text, setup params to pass to curl
                $sendGrid->assembleStats ();

                // Send stats to phone
                if (SendGridCurl::issueRequest ($sendGrid->get_statsParams()) == 0)
                    {
                    // Successful
                    $rc = 0;
                    }
                }
            }
        }

    exit ($rc);
    }

function usage ()
    {
    printf ("Usage: sgstats2phone.php {phone} {username} {api_key}\n");
    printf ("Ex:    sgstats2phone.php 3034029500 nsimon@solidcode.com MySecretApiKey\n");
    }
</pre>
<p>&nbsp;</p>
<pre>
&lt;?php

/******************************************************************************/
/* Module ..... CommandLine.php                                               */
/* Author ..... Neil Simon                                                    */
/* Modified ... 06/07/2011                                                    */
/******************************************************************************/

class CommandLine
    {
    protected $_argc = 0;  // Set in constructor
    protected $_argv = 0;  // Set in constructor

    public function __construct ($argc, $argv)
        {
        // Store count
        $this->_argc = $argc;

        // Store values array
        $this->_argv = $argv;
        }
    }

class CommandLine_sgstats2phone extends CommandLine
    {
    // Error constants
    const ERROR_ARG_PHONE_NOT_10      = 1;
    const ERROR_ARG_PHONE_NOT_NUMERIC = 2;

    // Extracted from command line positional values
    public $argPhone  = "";
    public $argUser   = "";
    public $argApiKey = "";

    public function __construct ($argc, $argv)
        {
        // Store argc, argv
        parent::__construct ($argc, $argv);
        }

    public function extractArgs ($display = true)
        {
        // Extract values
        $this->argPhone  = $this->_argv [1];
        $this->argUser   = $this->_argv [2];
        $this->argApiKey = $this->_argv [3];

        if ($display)
            {
            // Display the args
            printf ("argPhone ......... %s\n", $this->argPhone);
            printf ("argUser .......... %s\n", $this->argUser);
            printf ("argApiKey ........ %s\n", $this->argApiKey);
            printf ("\n");
            }
        }

    public function validateArgs ()
        {
        $rc = 1;

        // Phone must be length 10
        if (strlen ($this->argPhone) != 10)
            {
            $rc = self::ERROR_ARG_PHONE_NOT_10;
            }

        // Phone must be numeric
        elseif (!is_numeric ($this->argPhone))
            {
            $rc = self::ERROR_ARG_PHONE_NOT_NUMERIC;
            }

        else
            {
            // Success
            $rc = 0;
            }

        return ($rc);
        }

    public function printArgErrorMessage ($argErrorNum)
        {
        // Display error message
        switch ($argErrorNum)
            {
            case self::ERROR_ARG_PHONE_NOT_10:
                {
                printf ("ERROR: phone must be 10 characters.\n");
                break;
                }
            case self::ERROR_ARG_PHONE_NOT_NUMERIC:
                {
                printf ("ERROR: phone must be numeric.\n");
                break;
                }
            default:
                {
                printf ("ERROR: unknown error.\n");
                break;
                }
            }
        }
    }
</pre>
<p>&nbsp;</p>
<pre>
&lt;?php

/******************************************************************************/
/* Module ..... SendGrid.php                                                  */
/* Author ..... Neil Simon                                                    */
/* Modified ... 06/07/2011                                                    */
/******************************************************************************/

class SendGrid
    {
    private $_argPhone  = "";  // Set in constructor
    private $_argUser   = "";  // Set in constructor
    private $_argApiKey = "";  // Set in constructor

    private $_statsGetXml;     // Returned from stats.get.xml
    private $_statsParams;     // Filled by assembleStats ()

    public function __construct ($argPhone, $argUser, $argApiKey)
        {
        // Store values
        $this->_argPhone  = $argPhone;
        $this->_argUser   = $argUser;
        $this->_argApiKey = $argApiKey;
        }

    public function get_statsParams ()
        {
        // This is passed to curl
        return ($this->_statsParams);
        }

    public function statsGet ()
        {
        // Reset to 0 upon success
        $rc = 1;

        // Define constant for stats get
        define ("SENDGRID_XML_STATS_GET", "https://sendgrid.com/api/stats.get.xml?" .
                "api_user=$this->_argUser&#038;api_key=$this->_argApiKey");

        // Call the SendGrid API -- suppress any errors
        if (($statsGet = @file_get_contents (SENDGRID_XML_STATS_GET)) != FALSE)
            {
            // Create addressable XML array object to pass out
            $this->_statsGetXml = new SimpleXMLElement ($statsGet);

            // Success
            $rc = 0;
            }

        return ($rc);
        }

    public function assembleStats ($display = true)
        {
        // Split-out the date
        $month = date ("F",  strtotime ($this->_statsGetXml->day->date));  // May
        $day   = date ("jS", strtotime ($this->_statsGetXml->day->date));  // 10th
        $year  = date ("Y",  strtotime ($this->_statsGetXml->day->date));  // 2011

        // Extract the stats
        $requests      = $this->_statsGetXml->day->requests;
        $delivered     = $this->_statsGetXml->day->delivered;
        $invalid_email = $this->_statsGetXml->day->invalid_email;

        if ($display)
            {
            printf ("month ............ %s\n", $month);
            printf ("day .............. %s\n", $day);
            printf ("year ............. %s\n", $year);
            printf ("\n");

            printf ("requests ......... %s\n", $requests);
            printf ("delivered ........ %s\n", $delivered);
            printf ("invalid_email .... %s\n", $invalid_email);
            printf ("\n");
            }

        // Split-out the user email into 3 pieces (split on @ and .)
        $emailPieces = preg_split ("/[@\.]/", $this->_argUser);  // nsimon solidcode com

        // Build the text-to-speech string, part 1
        $textToSpeech1 = sprintf ("send grid stats for . " .
                                   "%s . at %s dot %s . %s %s . %s . ",
                                   $emailPieces [0],
                                   $emailPieces [1],
                                   $emailPieces [2],
                                   $month,
                                   $day,
                                   $year);

        // Build the text-to-speech string, part 2
        $textToSpeech2 = sprintf ("requests . %s . delivered . %s . in valid . %s . ",
                                   $requests,
                                   $delivered,
                                   $invalid_email);

        // Build the text-to-speech string, part 3
        $textToSpeech3 = "thank you . good bye";

        if ($display)
            {
            printf ("textToSpeech1 .... %s\n", $textToSpeech1);
            printf ("textToSpeech2 .... %s\n", $textToSpeech2);
            printf ("textToSpeech3 .... %s\n", $textToSpeech3);
            printf ("\n");
            }

        // Assemble the 3 text-to-speech pieces into the fullText
        $fullText = $textToSpeech1 . $textToSpeech2 . $textToSpeech3;

        // Setup params array for curl POSTFIELDS
        $this->_statsParams = array ("api_user"  => $this->_argUser,
                                     "api_key"   => $this->_argApiKey,
                                     "x-smtpapi" => "",
                                     "to"        => $this->_argPhone . "@phone",
                                     "subject"   => "<empty>",
                                     "html"      => "",
                                     "text"      => $fullText,
                                     "from"      => "");
        }
    }
</pre>
<p>&nbsp;</p>
<pre>
&lt;?php

/******************************************************************************/
/* Module ..... SendGridCurl.php                                              */
/* Author ..... Neil Simon                                                    */
/* Modified ... 06/07/2011                                                    */
/******************************************************************************/

class SendGridCurl
    {
    public function issueRequest ($params, $display = true)
        {
        // Reset to 0 upon success
        $rc = 1;

        // Define constant for SendGrid JSON URL
        define ("SENDGRID_JSON_REQUEST_URL", "http://sendgrid.com/api/mail.send.json");

        // Generate curl request
        if (($hCurl = curl_init (SENDGRID_JSON_REQUEST_URL)) == FALSE)
            {
            if ($display)
                {
                printf ("STATUS ........... ERROR: curl_init() failed\n");
                }
            }

        else
            {
            // Set the curl options
            curl_setopt ($hCurl, CURLOPT_POST,           true);    // POST
            curl_setopt ($hCurl, CURLOPT_HEADER,         false);   // Dont return headers
            curl_setopt ($hCurl, CURLOPT_RETURNTRANSFER, true);    // Return the response
            curl_setopt ($hCurl, CURLOPT_POSTFIELDS,     $params); // Add the POST body

            // Exec curl
            if (($response = curl_exec ($hCurl)) == FALSE)
                {
                if ($display)
                    {
                    printf ("STATUS ........... ERROR: curl_exec() failed\n");
                    }
                }

            else
                {
                if ($display)
                    {
                    printf ("STATUS ........... Message sent successfully\n");
                    }

                // Success
                $rc = 0;
                }

            // Close the curl handle
            curl_close ($hCurl);
            }

        return ($rc);
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://solidcode.com/2011/06/sendgrid-stats-to-phone-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin Development Tips</title>
		<link>http://solidcode.com/2010/09/wordpress-plugin-development-tips/</link>
		<comments>http://solidcode.com/2010/09/wordpress-plugin-development-tips/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 14:00:44 +0000</pubDate>
		<dc:creator>Neil Simon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://solidcode.com/?p=2378</guid>
		<description><![CDATA[The DandyID Services Plugin displays the social identity favicons of the blog author &#8212; from the DandyID service &#8212; and displays them in the blog sidebar. They can be displayed as favicons only or as a favicons list. The plugin calls a REST interface that is exposed by the DandyID return_services() API which returns the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://wordpress.org/extend/plugins/dandyid-services/" target="_blank">DandyID Services Plugin</a> displays the social identity favicons of the blog author &#8212; from the DandyID service &#8212; and displays them in the blog sidebar. They can be displayed as <a href="http://billso.com/" target="_blank">favicons only</a> or as a <a href="http://www.shericandler.com/" target="_blank">favicons list</a>. The plugin calls a <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">REST</a> interface that is exposed by the <a href="http://www.dandyid.org/api/documentation/return_services" target="_blank">DandyID return_services() API</a> which returns the data as XML. The DandyID web API is listed on <a href="http://www.programmableweb.com/api/dandyid" target="_blank">Programmable Web</a>, a useful web API directory.</p>
<p>The plugin, written in PHP, has several well-documented examples of helpful WordPress plugin features.</p>
<p>See how the <a href="https://plugins.svn.wordpress.org/dandyid-services/tags/1.5.9/readme.txt" target="_blank">readme.txt</a> maps to the <a href="http://wordpress.org/extend/plugins/dandyid-services/" target="_blank">hosted plugin pages</a> and the <a href="http://wordpress.org/extend/plugins/dandyid-services/screenshots/" target="_blank">5 hosted screenshots</a>.</p>
<p>The main code module <a href="https://plugins.svn.wordpress.org/dandyid-services/tags/1.5.9/dandyid-services.php" target="_blank">dandyid-services.php</a> has examples of:</p>
<ul>
<li>Creating a sidebar widget.</li>
<p></p>
<li>Processing returned XML that is PHP4 and PHP5 compatible.</li>
<p></p>
<li>Storing and retrieving wp-database options in an array.</li>
<p></p>
<li>Embedding the plugin name and version-number into a &lt;div&gt; tag that appears on all blog pages that render the plugin. (useful for debugging &#8212; many versions of the plugin can be out there in the wild)</li>
<p></p>
<li>Localization for international language support.</li>
<p></p>
<li>Creating an options page for admin plugin configuration, including HTML that renders radio buttons and checkboxes.</li>
<p></p>
<li>Caching the DandyID API results &#8212; on a busy blog, the plugin only calls the DandyID API once every 2 hours.</li>
<p></p>
<li>A plugin activation hook that creates initialized, defaulted wp-database options.</li>
<p></p>
<li>A plugin deactivation hook that cleanly removes the plugin wp-database options.</li>
</ul>
<p>The <a href="https://plugins.svn.wordpress.org/dandyid-services/tags/1.5.9/" target="_blank">WordPress maintained repository</a> contains all of the DandyID Services Plugin files for the current release. WordPress automatically packages the plugin files as a zipfile for downloading.</p>
]]></content:encoded>
			<wfw:commentRss>http://solidcode.com/2010/09/wordpress-plugin-development-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Boulder Startup Week &#8211; PHP Demo</title>
		<link>http://solidcode.com/2010/05/boulder-startup-week-php-demo/</link>
		<comments>http://solidcode.com/2010/05/boulder-startup-week-php-demo/#comments</comments>
		<pubDate>Wed, 05 May 2010 17:47:29 +0000</pubDate>
		<dc:creator>Neil Simon</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://solidcode.com/?p=2333</guid>
		<description><![CDATA[This code demonstrates: - Using PHP to create a command-line interface utility. - Passing in arguments from the command-line. - Calling the Weather Underground REST API (returns XML). - Extracting the weather text from the returned XML. Thanks to Ryan Cook for organizing this Boulder Startup Week session. #!/usr/local/php5/bin/php &#60;?php /*****************************************************************************/ /* This demo was [...]]]></description>
			<content:encoded><![CDATA[<p>This code demonstrates:<br />
- Using PHP to create a command-line interface utility.<br />
- Passing in arguments from the command-line.<br />
- Calling the Weather Underground REST API (returns XML).<br />
- Extracting the weather text from the returned XML.</p>
<p>Thanks to <a href="http://twitter.com/cookrn">Ryan Cook</a> for organizing this <a href="http://boulderstartupweek.com">Boulder Startup Week</a> session.</p>
<pre>
#!/usr/local/php5/bin/php
&lt;?php

/*****************************************************************************/
/* This demo was created by Neil Simon for Ryan Cooks PHP Hacking Session    */
/* Boulder Startup Week, 05/05/2010                                          */
/*****************************************************************************/
/* Module ........ get_forecast.php                                          */
/* Description ... (1) Uses PHP to create a command-line utility             */
/*                 (2) Passes arguments in from the command-line             */
/*                 (3) Calls the Weather Underground REST API (returns XML)  */
/*                 (4) Extracts the weather text from the returned XML       */
/* Usage ......... get_forecast.php {zip5}                                   */
/* Example ....... get_forecast.php 80304                                    */
/*****************************************************************************/

// First executable line, calls main()
main ($argc, $argv);

function main ($argc, $argv)
    {
    // Initialize to failure, set to 0 upon success
    $rc = 1;

    // Ex: $argv[0] get_forecast.php
    // Ex: $argv[1] 80304
    if ($argc != 2)
        {
        printf ("Usage ..... get_forecast.php {zip5}\n");
        printf ("Example ... get_forecast.php 80304\n");
        }
    else
        {
        // Extract option value
        $zip5 = $argv [1];

        // Get weather lines of text
        $weatherForecastLinesArray = array ();

        // Get lines of weather text
        if (getWeatherForecast ($zip5, $weatherForecastLinesArray) == 0)
            {
            // Display lines
            foreach ($weatherForecastLinesArray as $weatherForecastLine)
                {
                printf ("%s\n", $weatherForecastLine);
                }

            // Successful
            $rc = 0;
            }
        }

    // Returns status code to the operating system
    return ($rc);
    }

function getWeatherForecast ($zip5, &#038;$weatherForecastLinesArray)
    {
    // Initialize to failure, set to 0 upon success
    $rc = 1;

    // Create a constant that points to the REST API
    define (WUNDERGROUND_API_URL,
    "http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=$zip5");

    // Get the weather text -- returned as XML
    if (($wundergroundStr = file_get_contents (WUNDERGROUND_API_URL)) == FALSE)
        {
        printf ("ERROR: file_get_contents (WUNDERGROUND_API_URL) failed.\n");
        }
    else
        {
        // Create the XML array from the returned data
        $wundergroundXml = new SimpleXMLElement ($wundergroundStr);

        // Extract the text fields
        $forecastday = $wundergroundXml->txt_forecast->forecastday [0];
        $weatherForecastLinesArray [] = $forecastday->title;
        $weatherForecastLinesArray [] = $forecastday->fcttext . "\n";

        // Successful
        $rc = 0;
        }

    return ($rc);
    }

?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://solidcode.com/2010/05/boulder-startup-week-php-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Matters Most</title>
		<link>http://solidcode.com/2009/08/what-matters-most/</link>
		<comments>http://solidcode.com/2009/08/what-matters-most/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 14:56:13 +0000</pubDate>
		<dc:creator>Neil Simon</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://solidcode.com/?p=1165</guid>
		<description><![CDATA[What matters most is how you program. Technologies come and go, but good working practices last forever. The easiest mistakes to fix are the ones you don&#8217;t make.]]></description>
			<content:encoded><![CDATA[<p>What matters most is how you program.</p>
<p>Technologies come and go, but good working practices last forever.</p>
<p>The easiest mistakes to fix are the ones you don&#8217;t make.</p>
]]></content:encoded>
			<wfw:commentRss>http://solidcode.com/2009/08/what-matters-most/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Top People Skills for Developers</title>
		<link>http://solidcode.com/2009/04/top-people-skills-for-developers/</link>
		<comments>http://solidcode.com/2009/04/top-people-skills-for-developers/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 02:10:35 +0000</pubDate>
		<dc:creator>Neil Simon</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://solidcode.com/?p=476</guid>
		<description><![CDATA[Be Friendly People like to work with people they like. A genuine smile and a positive attitude goes a long way. Respect everyone &#8212; you can learn from everyone. Be Collaborative Work hard to build concensus among stakeholders. Be willing to compromise. If you don&#8217;t agree with an idea, suggest creative alternatives that can incorporate [...]]]></description>
			<content:encoded><![CDATA[<h3>Be Friendly</h3>
<ul>
<li>People like to work with people they like.</li>
<li>A genuine smile and a positive attitude goes a long way.</li>
<li>Respect everyone &#8212; you can learn from everyone.</li>
</ul>
<p></p>
<h3>Be Collaborative</h3>
<ul>
<li>Work hard to build concensus among stakeholders.</li>
<li>Be willing to compromise.</li>
<li>If you don&#8217;t agree with an idea, suggest creative alternatives that can incorporate the idea in different ways.</li>
</ul>
<p></p>
<h3>Be a Great Listener</h3>
<ul>
<li>What does the user really need?</li>
<li>It&#8217;s not what you want &#8212; it&#8217;s what they want.</li>
<li>Listen objectively. Ask open ended questions. Allow everyone the opportunity to speak.</li>
</ul>
<p></p>
<h3>Deliver Some Early Pieces Quickly</h3>
<ul>
<li>Lets your user know you&#8217;ve been listening.</li>
<li>Gives users an opportunity for feedback.</li>
<li>Keeps the conversation going in a positive direction.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://solidcode.com/2009/04/top-people-skills-for-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

