<?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>Bobby Sciacchitano</title>
	<atom:link href="http://bobbysciacchitano.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bobbysciacchitano.com</link>
	<description>My World on the Internet</description>
	<lastBuildDate>Sun, 06 May 2012 07:45:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>$4 Lucky Boom Boom Pizza</title>
		<link>http://bobbysciacchitano.com/2012/05/06/4-lucky-boom-boom-pizza/</link>
		<comments>http://bobbysciacchitano.com/2012/05/06/4-lucky-boom-boom-pizza/#comments</comments>
		<pubDate>Sun, 06 May 2012 07:42:58 +0000</pubDate>
		<dc:creator>Bobby</dc:creator>
				<category><![CDATA[The Kitchen]]></category>
		<category><![CDATA[Cooking]]></category>
		<category><![CDATA[Dinner]]></category>
		<category><![CDATA[Meal Ideas]]></category>
		<category><![CDATA[Pizza]]></category>

		<guid isPermaLink="false">http://bobbysciacchitano.com/?p=183</guid>
		<description><![CDATA[If you&#8217;ve ever been to Lucky Coq on Chapel St you&#8217;ll know they do a $4 pizza special which is mostly a few sparsely placed toppings on a pita bread base. I thought I&#8217;d have a go at making a &#8230; <a href="http://bobbysciacchitano.com/2012/05/06/4-lucky-boom-boom-pizza/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever been to Lucky Coq on Chapel St you&#8217;ll know they do a $4 pizza special which is mostly a few sparsely placed toppings on a pita bread base. I thought I&#8217;d have a go at making a pizza with a fresh tomato sauce and a decent serve of toppings.</p>
<p>The great thing about using pita bread is it&#8217;s lighter and slightly healthier than supermarket pizza bases which means you can load up on more toppings.</p>
<p><span id="more-183"></span> Ingredients:</p>
<ul>
<li>Bag of flat / pita bread,</li>
<li>Smoked leg ham, sliced thick,</li>
<li>Mozzarella cheese,</li>
<li>Tomatos,</li>
<li>Spinach leaves.</li>
</ul>
<p>For the sauce:</p>
<ul>
<li>1 can of crushed tomatoes,</li>
<li>¼ red onion,</li>
<li>Olive oil,</li>
<li>Oregano, Basil, Bay Leaf and salt to taste.</li>
</ul>
<p>Steps:</p>
<ol>
<li>Prepare the sauce by dicing the onion and placing into a small saucepan with a dab of olive oil on a medium heat.</li>
<li>Fry the onion until until brown then place half can of tomatoes into the saucepan and stir until boiling. You can also put in whatever spices and salt to add taste. The idea is to reduce the sauce slightly so it doesn&#8217;t become too runny when you cook the pizza in the oven.</li>
<li>Next, slice up the ham, tomato and mozzarella and wash and prepare the spinach leaves by removing the stems.</li>
<li>Preheat your oven to 180°.</li>
<li>You can now build up your pizza by (obviously) starting with the tomato sauce then adding the tomato, spinach leaves, ham then finally the mozzarella cheese.</li>
</ol>
<p>Put your newly minted pizza in the oven. I noticed that there can be slight variations between cooking time depending on the toppings. My rule of thumb is once the cheese is completely melted and the outer crust is slightly browned, it&#8217;s ready.</p>
<p>So, have you had a go at cooking this? Got any suggestions or variations on toppings? Add your thoughts in the comments box below.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbysciacchitano.com/2012/05/06/4-lucky-boom-boom-pizza/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Parameters in Symfony DI</title>
		<link>http://bobbysciacchitano.com/2012/05/01/custom-parameters-in-symfony-di/</link>
		<comments>http://bobbysciacchitano.com/2012/05/01/custom-parameters-in-symfony-di/#comments</comments>
		<pubDate>Tue, 01 May 2012 06:25:59 +0000</pubDate>
		<dc:creator>Bobby</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[DI]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://bobbysciacchitano.com/?p=167</guid>
		<description><![CDATA[I&#8217;m working on a project where we use a compiled Symfony DI container with a parameter bag for configuration parameters. One issue I&#8217;ve been having with this is the inability to work with multiple environments without having to rebuild the &#8230; <a href="http://bobbysciacchitano.com/2012/05/01/custom-parameters-in-symfony-di/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a project where we use a compiled Symfony DI container with a parameter bag for configuration parameters.</p>
<p>One issue I&#8217;ve been having with this is the inability to work with multiple environments without having to rebuild the container for every environment change or having a container classes for each environment.</p>
<p><span id="more-167"></span><br />
We have a class which has the ability to load a the config file for a specific environment and this functionality is used in other parts of the application. My conclusion was therefore to extend the Service container class by making the compiled DI container class abstract. It is then possible to drop in any type of config depending on the environment.</p>
<pre>&lt;php

use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

class Service extends ServiceAbstract
{

    public function __construct(ParameterBag $parameterBag = null)
    {
        $this->parameterBag = null === $parameterBag ? new ParameterBag($this->getDefaultParameters()) : $parameterBag;

        $this->services       = array();
        $this->scopes         = array();
        $this->scopeChildren  = array();
        $this->scopedServices = array();
        $this->scopeStacks    = array();

        $this->set('service_container', $this);
    }

    public function getDefaultParameters()
    {
        $Config = new Service\Infrastructure\Config;

        $config = $Config->getApplicationConfig();

        return $config[ 'resources' ];
    }

}</pre>
<p>While this in some ways breaks the DI design pattern it means an app server that has to deal with multiple environments can function without having to do too much extra work.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbysciacchitano.com/2012/05/01/custom-parameters-in-symfony-di/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why View to a Kill is the best James Bond film</title>
		<link>http://bobbysciacchitano.com/2012/03/14/why-view-to-a-kill-is-the-best-james-bond-film/</link>
		<comments>http://bobbysciacchitano.com/2012/03/14/why-view-to-a-kill-is-the-best-james-bond-film/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 11:47:18 +0000</pubDate>
		<dc:creator>Bobby</dc:creator>
				<category><![CDATA[Cinema]]></category>
		<category><![CDATA[007]]></category>
		<category><![CDATA[James Bond]]></category>
		<category><![CDATA[Lists]]></category>
		<category><![CDATA[Movies]]></category>

		<guid isPermaLink="false">http://bobbysciacchitano.com/?p=143</guid>
		<description><![CDATA[Over the weekend I watched Roger Moore&#8217;s last outing as James Bond in the 1985 film, From a View to a Kill. I decided to compile a list of reasons why it&#8217;s the best of the James Bond franchise: Disclaimer &#8230; <a href="http://bobbysciacchitano.com/2012/03/14/why-view-to-a-kill-is-the-best-james-bond-film/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://bobbysciacchitano.com/wordpress/wp-content/uploads/2012/03/view_to_a_kill.jpg"><img class="alignnone size-full wp-image-149" title="View to a Kill" src="http://bobbysciacchitano.com/wordpress/wp-content/uploads/2012/03/view_to_a_kill-e1331726622686.jpg" alt="" width="635" height="304" /></a></p>
<p>Over the weekend I watched Roger Moore&#8217;s last outing as James Bond in the 1985 film, From a View to a Kill. I decided to compile a list of reasons why it&#8217;s the best of the James Bond franchise:</p>
<ul>
<li>Disclaimer at the start,</li>
<li>Made in 1985,</li>
<li>Henchman&#8217;s mode of transport (blimps),</li>
<li>Christopher Walken,</li>
<li>Golden Gate Bridge,</li>
<li>Theme song by Duran Duran *,</li>
<li>Plot involving blowing up Silicon Valley,</li>
<li>Tanya Roberts&#8217; acting,</li>
<li>Clouseau stereotype French inspector,</li>
<li>Obvious continuity errors and jump cuts,</li>
<li>Rock shaped submarine,</li>
<li>Henchwoman becomes good&#8230; gets killed,</li>
<li>KGB Agents,</li>
<li>Parachutist jumping of the Eiffel Tower,</li>
<li>Apple computer product placement,</li>
<li>Lots of Cameo appearances.</li>
</ul>
<p>* Could be taken as a negative.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbysciacchitano.com/2012/03/14/why-view-to-a-kill-is-the-best-james-bond-film/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing &#8220;Setting locale failed&#8221; error in Ubuntu Server</title>
		<link>http://bobbysciacchitano.com/2012/02/25/fixing-setting-locale-failed-error-in-ubuntu-server/</link>
		<comments>http://bobbysciacchitano.com/2012/02/25/fixing-setting-locale-failed-error-in-ubuntu-server/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 09:54:47 +0000</pubDate>
		<dc:creator>Bobby</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://bobbysciacchitano.com/?p=137</guid>
		<description><![CDATA[When I was redeploying my IntoVPS Server and upgrading to the newest version of Ubuntu Server, I came across a number of issues with locales not being configured correctly. The error usually looks something like this: perl: warning: Setting locale &#8230; <a href="http://bobbysciacchitano.com/2012/02/25/fixing-setting-locale-failed-error-in-ubuntu-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I was redeploying my IntoVPS Server and upgrading to the newest version of Ubuntu Server, I came across a number of issues with locales not being configured correctly. The error usually looks something like this:</p>
<pre>perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
</pre>
<p>You&#8217;re getting this error because no locales have been configured. To fix it, firstly ensure that you have the <code>locales</code> package installed:</p>
<pre>
$ apt-get install locales
</pre>
<p>If <code>locales</code> is not installed, you will get a screen which will ask you which locales you wish to enable. If <code>locales</code> is already installed, then type the following to commands to regenerate locales.</p>
<pre>
$ locale-gen en_US en_US.UTF-8 en_AU en_AU.UTF-8
$ dpkg-reconfigure locales
</pre>
<p>If you want to use other locales, you can re-run the <code>locale-gen</code> and <code>dpkg-reconfigure locales</code> commands.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbysciacchitano.com/2012/02/25/fixing-setting-locale-failed-error-in-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autoloading 101</title>
		<link>http://bobbysciacchitano.com/2012/01/27/autoloading-101/</link>
		<comments>http://bobbysciacchitano.com/2012/01/27/autoloading-101/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 23:42:48 +0000</pubDate>
		<dc:creator>Bobby</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Autoload]]></category>
		<category><![CDATA[PHP 5.3]]></category>
		<category><![CDATA[SPL]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://bobbysciacchitano.com/?p=69</guid>
		<description><![CDATA[For some who are new to PHP 5 you may have heard about a PHP feature called SPL Autoload or Autoloading classes. Ordinarily, when you write a class your code may look something like this: &#60;?php require_once('../code/foo.php'); require_once('../code/baz.php'); class widget extends &#8230; <a href="http://bobbysciacchitano.com/2012/01/27/autoloading-101/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For some who are new to PHP 5 you may have heard about a PHP feature called <a title="PHP Manual Documentation" href="http://au2.php.net/manual/en/function.spl-autoload-register.php">SPL Autoload</a> or Autoloading classes.</p>
<p>Ordinarily, when you write a class your code may look something like this:</p>
<pre>&lt;?php

require_once('../code/foo.php');
require_once('../code/baz.php');

class widget extends foo
{
    public function event()
    {
        $baz = new baz();
    }
}</pre>
<p>Autoloading does away with the need to put require / include once to include class file by enabling you to attach a function that performs an action before a class is instantiated. SPL autoload works when you try to instantiate a class or use reflection on a class and only works when the class hasn&#8217;t already been loaded.</p>
<p><span id="more-69"></span></p>
<p><strong>Basic Autoloader</strong></p>
<p>This Autoload script looks at the name of the class, converts the class name into a path then includes the file. In this example, I&#8217;ve written my function so it will handle PHP 5.3 namespaced classes as well.</p>
<p>The Autoload function works on a couple of assumptions:</p>
<ol>
<li>There is only one class per file,</li>
<li>Your library directories are organised by a <a title="Zend Framework Naming Conventions" href="http://framework.zend.com/manual/en/coding-standard.naming-conventions.html">vendor structure</a></li>
</ol>
<p>This is a fairly high level implementation, there are a number of different approaches to class loading in PHP 5 however, this is my favourite because it&#8217;s the simplest.</p>
<pre>&lt;php

// Register autoloader
spl_autoload_register('loadGenericClass');

// Set base include paths
$paths = array();
$paths[] = "/PATH/TO/LIBRARY/";
$paths[] = "/PATH/TO/ANOTHER_LIBRARY/";
$paths[] = get_include_path();

set_include_path(implode(PATH_SEPARATOR, $paths));

// Autoloader
function loadGenericClass($class)
{
    $path = str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $class) . '.php';

    @include_once($path);
}</pre>
<p><strong>Stepping through the code</strong></p>
<p>The first part registers a function that can be used to include a file. In this instance, the function is called <code>loadGenericClass</code>. Underneath, I&#8217;ve set up an array of paths to search through. We&#8217;re going to add these to the <a title="PHP Manual Documentation" href="http://au2.php.net/set_include_path">include path</a> since we want our autoload function to have complete access to our bespoke code and PEAR / PECL classes. In my example, my library files are in multiple locations which is I why I prefer to use an array over building a long string.</p>
<p>When PHP calls the <code>loadGenericClass</code> function it passes in the class name. In this instance, I&#8217;m performing a simple replace to look for underscores (_) and backticks (\) and replace them with a slash. The slash represents the path of the class file. For example <code>Vendor_Group_Class</code> is converted to <code>Vendor/Group/Class.php</code>.</p>
<p>We also look for backticks because in PHP 5.3 now has <a title="PHP Manual Documentation" href="http://au2.php.net/namespace">namespace support</a>. In this instance, the variable will be <code>\Vendor\Group\Class</code> which is converted to <code>Vendor/Group/Class.php</code>.</p>
<p>Finally, the file gets included into the script. This will use the include path to load the class file.</p>
<p>And there you have it. Class loading in PHP 5 without the need for include and require everywhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbysciacchitano.com/2012/01/27/autoloading-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful MySQL commands</title>
		<link>http://bobbysciacchitano.com/2012/01/19/useful-mysql-commands/</link>
		<comments>http://bobbysciacchitano.com/2012/01/19/useful-mysql-commands/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 01:00:48 +0000</pubDate>
		<dc:creator>Bobby</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://bobbysciacchitano.com/?p=41</guid>
		<description><![CDATA[I&#8217;m currently working on a project which requires me to use MySQL from the command line. This presents a number of interesting issues for a developer who prefers a GUI to perform management functions. I&#8217;ve started to compile a list &#8230; <a href="http://bobbysciacchitano.com/2012/01/19/useful-mysql-commands/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on a project which requires me to use MySQL from the command line. This presents a number of interesting issues for a developer who prefers a <a title="Sequel Pro" href="http://www.sequelpro.com/" target="_blank">GUI</a> to perform management functions.</p>
<p>I&#8217;ve started to compile a list of some of the more useful and maybe unknown MySQL commands.</p>
<p><span id="more-41"></span></p>
<pre>\! clear;</pre>
<p>Similar to the Linux clear command it gives you a shiny clean MySQL buffer for you to dirty up again.</p>
<pre>SHOW FULL PROCESSLIST;</pre>
<p>If you use the standard SHOW PROCESSLIST function, you&#8217;ll notice that the result in the info column is truncated which is unhelpful if there is a number of queries with similar syntax running. Adding FULL will return the full SQL query but will probably break the column layout which brings me to my next command:</p>
<pre>SHOW FULL PROCESSLIST \G;

SELECT * FROM table \G;</pre>
<p>Adding \G to the end of a query returns results in a &#8216;card view&#8217; layout which is useful if you have columns with large amounts of data.</p>
<pre>SHOW OPEN TABLES;</pre>
<p>If you&#8217;re working on a database which uses transactions and are trying to work out if a table is locked, or in use, this query will tell you.</p>
<pre>SHOW TABLE STATUS;</pre>
<p>This view will show you details related to the table including engine, how many rows in the table when it was created, updated and rows.</p>
<pre>SHOW CREATE TABLE `table_name`;</pre>
<p>This will dump the create script for the specified table name, useful if you don&#8217;t want to use MySQL dump to get the schema.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbysciacchitano.com/2012/01/19/useful-mysql-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Resolutions</title>
		<link>http://bobbysciacchitano.com/2012/01/04/on-resolutions/</link>
		<comments>http://bobbysciacchitano.com/2012/01/04/on-resolutions/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 06:37:54 +0000</pubDate>
		<dc:creator>Bobby</dc:creator>
				<category><![CDATA[Housekeeping]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[people]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[resolutions]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://bobbysciacchitano.com/?p=3</guid>
		<description><![CDATA[I&#8217;ve always been of the opinion that people put too much stock into New Year resolutions &#8211; simply because they eventually fall by the wayside. My only resolution has always been that the new year be better than the one &#8230; <a href="http://bobbysciacchitano.com/2012/01/04/on-resolutions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been of the opinion that people put too much stock into New Year resolutions &#8211; simply because they eventually fall by the wayside. My only resolution has always been that the new year be better than the one just gone.</p>
<p>When I was deciding whether to restart my blog, I considered if it would be a good idea to import the 2000 or so posts I accumulated in archive form from personal sites going back to 2003. Every year up until 2007, I&#8217;d do a post about what I want to achieve in the new year but then I realised the process was pointless: being the best you can be was more important. I also decided not to import the posts simply because they&#8217;re rubbish.</p>
<p>This year, I thought it&#8217;d be fun to write down some resolutions and see how they pan out.</p>
<p><span id="more-3"></span>Some of my favourite ones include:</p>
<ul>
<li>Attain my drivers licence</li>
<li>Learn how to play the guitar</li>
<li>Travel again, this time to Singapore, London and New York</li>
<li>Run 12K in just under 1h 5m</li>
<li>Deactivate my Facebook profile</li>
</ul>
<p>Whoa&#8230; What was the last one? <strong>Deactivate</strong> my Facebook profile. Actually, I just ticked that one off the list.</p>
<p>There were a number of reasons why I decided to do this. Firstly, it was eating a massive chunk of my 150mb monthly data access on Vodafone. I&#8217;m looking at getting off Vodafone when my contract runs out and I don&#8217;t want upgrade and be locked in for another 24 months.</p>
<p>The second and perhaps more important reason is because I felt that over the last two years the human element of interactions I had with others &#8211; friends, family and acquaintances had completely diminished. No one ever bothered to ring me to invite me to an event; it was simply put up on Facebook, if something exciting happened I&#8217;d read about it on the wall, if I wanted to chat to someone it&#8217;d be easier to open the chat window rather than make a phone call or meet face to face. I was just as bad. It made me really, really lazy.</p>
<p>In the end, I felt like I was beholden to Facebook for everything.</p>
<p>As a web developer and social media junkie, it&#8217;s the hardest thing to do but after all Facebook is only one conduit for interacting with others. This year I decided I was going to make my relationships more meaningful. It means others are going to have to make the same effort in return.</p>
<p>Roll on 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://bobbysciacchitano.com/2012/01/04/on-resolutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

