<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
   <channel>
      <title> - Michael Peacock's Blog</title>
      <link>http://www.michaelpeacock.co.uk/</link>
      <description />
      <generator><![CDATA[
    	Peacock Carter CMS Blog Module
      ]]></generator>
      <ttl>3600</ttl>
      
      <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MichaelPeacockBlog" /><feedburner:info uri="michaelpeacockblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
         <title> - <![CDATA[ Accessing Internal Servers Remotely via Tunnelling ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/Tqed467yhz4/accessing-internal-servers-remotely-via-tunnelling</link>
         <description>&lt;p&gt;Over at &lt;a href="http://www.groundsix.com"&gt;Ground Six&lt;/a&gt; the development team each run a number of virtual machines hosting their development environment. We also have an internal ESXi server which hosts a number of projects and staging areas.&lt;/p&gt;
&lt;p&gt;For our local machines, tools such as &lt;a href="http://progrium.com/localtunnel/"&gt;LocalTunnel&lt;/a&gt; and &lt;a href="https://pagekite.net/"&gt;PageKite&lt;/a&gt; are great. These are free services which tunnel out and expose a particular port (for us this is always the web server) on a subdomain they provide. This is essential for testing services with webhooks such as PayPal or GoCardless.&lt;/p&gt;
&lt;p&gt;Both of these services are very good and customisable. The v2 of LocalTunnel and PageKite offer some facility to run your own service or front-end without needing to rely on their own servers. Unfortunately, LocalTunnel v2 is very much unstable software, and PageKites documentation is a little overwhelming (although I'm told their rpm and deb files help with that). With this in mind I set about putting something (very basic) together myself, primarily for the servers we have running on our ESXi box; PageKite is more than suitable for our local machines for now.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/Tqed467yhz4" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/accessing-internal-servers-remotely-via-tunnelling</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/accessing-internal-servers-remotely-via-tunnelling</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ Why reinvent the wheel? ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/Ysjc9uE6AKo/why-reinvent-the-wheel</link>
         <description>&lt;p&gt;As developers, it's sometimes tempting to reinvent the wheel.&lt;/p&gt;
&lt;p&gt;You need some code, a tool, an API, a CMS or framework that works in a specific way. You find tools out there that do most of what you want, but not quite everything.  And so, we give in to temptation.  Before you know it, you have spent more time reinventing things that you need just so that you can start developing your product - but you haven't yet started on the product!&lt;/p&gt;
&lt;p&gt;Sometimes there is a genuine case for reinventing the wheel.  If you rely too heavily on external frameworks, or APIs, you can find that your product can only be extended in ways that the external code allows.  You might not want to be tied to the development cycle of someone else (&lt;a href="http://techcrunch.com/2012/08/10/branchout-ceo-rick-marini-on-building-a-company-atop-facebooks-shifting-sands-tctv/"&gt;Facebook's ever shifting sands&lt;/a&gt; anyone?). These particular risks come down to your business needs, and in many cases, are an acceptable risk, especially over building things entirely from scratch.&lt;/p&gt;
&lt;p&gt;Even if you find the risk of existing frameworks or platforms too great, or you just want to retain architectural control of your product, there is an alternative: Components.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/Ysjc9uE6AKo" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/why-reinvent-the-wheel</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/why-reinvent-the-wheel</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ Perfecting Digital Ownership & Facilitating Team Development ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/14GWwZWunRI/perfecting-digital-ownership--facilitating-team-development</link>
         <description>&lt;p&gt;Over at &lt;a href="http://www.groundsix.com/"&gt;Ground Six&lt;/a&gt; last week we put &lt;a href="https://www.ownmyip.com"&gt;Own My IP&lt;/a&gt; online.  This was our first project as a development team.  Alongside this we have worked on some other projects, including ShareScribe, our first team Hack-Day and the redevelopment of a high-traffic news service - more on those another day.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img style="padding: 5px !important;" title="Own My IP" src="http://www.michaelpeacock.co.uk/uploads/assets/large/ScreenShot2012-08-05at01.17.30.png" alt="Own My IP" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/14GWwZWunRI" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/perfecting-digital-ownership--facilitating-team-development</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/perfecting-digital-ownership--facilitating-team-development</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ Nested submodules in Git ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/jw82c8KkEUY/nested-submodules-in-git</link>
         <description>&lt;p&gt;I'm currently working on a project which has been split into a number of distinct parts, and as a result we have a number of seperate Git repositories of code for the project.  We decided to use submodules to manage these dependencies, and set it up so that the four repositories were nested, one inside the other, inside the other, inside the other.&lt;/p&gt;
&lt;p&gt;When working with nested submodules, its a little bit of a pain to get all of the submodules checked out, and updated (assuming you want your projects to update as each dependant submodule changes). &lt;a href="http://www.twitter.com/2bard"&gt;Lewis&lt;/a&gt; and I put our heads together and came up with this solution.&lt;/p&gt;
&lt;p&gt;When you have cloned a project with submodules, first run this. It will intiailise and subsequently clone each of the submodules.&lt;/p&gt;
&lt;pre&gt;git submodule update --recursive --merge --init&lt;/pre&gt;
&lt;p&gt;When you are ready to update the code to take into account changes to submodule code, first, do a pull on your main repository.&lt;/p&gt;
&lt;pre&gt;git pull&lt;/pre&gt;
&lt;p&gt;Then tell git to look recursively through each submodules, ensure we are tied to a branch and not running headless (which will prevent a pull), then pull the changes.&lt;/p&gt;
&lt;pre&gt;git submodule foreach --recursive 'git checkout master &amp;amp;&amp;amp; git pull'&lt;/pre&gt;
&lt;p&gt;Now you can make use of nested submodules in your project and have changes down the line pulled all the way up to your main project.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/jw82c8KkEUY" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/nested-submodules-in-git</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/nested-submodules-in-git</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ SalesJump - Launched ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/qux-6lqG0e8/salesjump--launched</link>
         <description>&lt;p&gt;&lt;strong&gt;Full Disclosure:&lt;/strong&gt; I'm a full time member of the Ground Six team (more on that in a future post), so this review is &lt;em&gt;slightly&lt;/em&gt; biased, however its a great milestone for us so I felt the need to share it.&lt;/p&gt;
&lt;p&gt;Today marks the official launch of SalesJump, an iPhone app developed by Ground Six, a web and mobile app company based in Newcastle.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/qux-6lqG0e8" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/salesjump--launched</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/salesjump--launched</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ Processing CAN Messages in PHP ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/4TQae4J_db8/processing-can-messages-in-php</link>
         <description>&lt;p&gt;The automotive industry makes extensive use of a standard called CAN bus, a Controller Area Network which allows the various components of a vehicle to talk to each other without the need for a host.  Typically, messages sent on the CAN bus are short 16 character hexadecimal words, with an identifier associated with them.  To get from these 16 character words to meaningful information you need two things: a CAN specification provided by the relevant component manufacturer, and a way to process the information and decode it as per the specification.&lt;/p&gt;
&lt;p&gt;Recently, I've been doing some work which has involved verifying the information that has been extracted from the CAN bus is correct, and that we are interpreting the CAN specification correctly.  This has proved difficult, as while I can see where the specification hasn't been correctly translated into the application which processes it, it isn't easy to see (when it has been translated correctly) where the incorrect values are coming from.  To make things easier, and to try and further my knowledge of the CAN bus, I have written a PHP based CAN processing tool.  This allows me to perform the translations and calculations myself and see why certain pieces of information have been translated incorrectly.&lt;/p&gt;
&lt;p&gt;As a seperate project I'm working with a group of engineers to develop a small autonomous robot, which will use a CAN bus to keep itself aware of its location and what its various components are doing.  With this PHP tool, I will be able to quickly process what it is doing and display this in a web browser without the need for some middleware application.&lt;/p&gt;
&lt;p&gt;The CAN processing tool is relatively simple.  You provide an XML based specification detailing which type of CAN bus messages can be translated into which useful pieces of information, detailing which bytes and bits of the hexadecimal word contain the information, as well as which scaling, multiplication and data type conversion (e.g. convert two a short by applying a two's compliment) factors need to be applied to get the correct output.&lt;/p&gt;
&lt;h2&gt;Get the code&lt;/h2&gt;
&lt;p&gt;The code is available on GitHub: &lt;a href="https://github.com/mkpeacock/PHP-CAN-Processor"&gt;https://github.com/mkpeacock/PHP-CAN-Processor&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;How to use it&lt;/h2&gt;
&lt;p&gt;There are two ways to use the application, you can either provide an XML specification to the application, pass a message and let it do the work, or you can manually tell the application which messages need to be translated in which ways.&lt;/p&gt;
&lt;h3&gt;Providing a specification&lt;/h3&gt;
&lt;p&gt;The easiest way to use this system is to provide an XML based "specification" of the different CAN message types you wish to decode, and the pieces of information from within.&lt;/p&gt;
&lt;pre class="brush: php;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;canspec&amp;gt;
    &amp;lt;canID id="ABC" type="multiplex" multiplexByte="0" namePrefix="" nameSuffix="_Piston%1$d"&amp;gt;
        &amp;lt;engineeringUnit type="multi-byte"&amp;gt;
            &amp;lt;name&amp;gt;Piston_position&amp;lt;/name&amp;gt;
            &amp;lt;unit&amp;gt;mm&amp;lt;/unit&amp;gt;
            &amp;lt;mostSignificantByte&amp;gt;2&amp;lt;/mostSignificantByte&amp;gt;
            &amp;lt;leastSignificantByte&amp;gt;3&amp;lt;/leastSignificantByte&amp;gt;
            &amp;lt;dataType&amp;gt;null&amp;lt;/dataType&amp;gt;
            &amp;lt;multiplier&amp;gt;0.01&amp;lt;/multiplier&amp;gt;
            &amp;lt;offset&amp;gt;0&amp;lt;/offset&amp;gt;
        &amp;lt;/engineeringUnit&amp;gt;
    &amp;lt;/canID&amp;gt;
&amp;lt;/canspec&amp;gt;  
&lt;/pre&gt;
&lt;p&gt;You can then use a factory to build the keys, the decoders and turn that into a collection of decoders.&lt;/p&gt;
&lt;pre class="brush: php;"&gt;$factory = new CentralApps\CAN\Decoder_Factory();
$spec = $factory-&amp;gt;makeDecoderFromXMLFile('sample_can_specification.xml');
&lt;/pre&gt;
&lt;p&gt;Passing a message to the collection of decoders will find the decoder for that can message type, and perform the decoding logic from within.&lt;/p&gt;
&lt;pre class="brush: php;"&gt;$message = new CentralApps\CAN\Message( 'ABC', '0000000000000000' );
$units = $spec-&amp;gt;decode( $message );
foreach( $units as $unit )
{
    echo $unit;
}
&lt;/pre&gt;
&lt;h3&gt;Manual&lt;/h3&gt;
&lt;pre class="brush: php;"&gt;$message = new CentralApps\CAN\Message( 'ABC', '0000000000000000' );


$multiByteKey = new CentralApps\CAN\Decoder_Keys_MultiByte();
$multiByteKey-&amp;gt;setCanID( 'ABC' );
$multiByteKey-&amp;gt;setName( 'Piston_position' );
$multiByteKey-&amp;gt;setUnit( "mm" );
$multiByteKey-&amp;gt;setMultiplier( 0.01 );
$multiByteKey-&amp;gt;setOffset( 0 );
$multiByteKey-&amp;gt;setMostSignificantByte( 2 );
$multiByteKey-&amp;gt;setLeastSignificantByte( 3 );
$multiByteKey-&amp;gt;setDataLength( 16 );
$multiByteKey-&amp;gt;setDataType( 'short' );

$decoder = new CentralApps\CAN\Decoder_Multiplex();
$decoder-&amp;gt;setMultiplexByte(0);
$decoder-&amp;gt;setNameSuffix('_Pison%1$d');
$decoder-&amp;gt;add( $multiByteKey );
$units = $decoder-&amp;gt;decode( $message );
foreach( $units as $unit )
{
    echo $unit;
}
&lt;/pre&gt;
&lt;h2&gt;Other notes&lt;/h2&gt;
&lt;p&gt;This tool makes use of the PSR-0 autoloading "standard", so if you use an autoloader compatible with this you should just be able to drop the code in.  If you find you need to support another data type conversion, simply create a new class in the /src/CentralApps/CAN/Decoder/DataTypes folder which implements the Decoder_DataTypes_Interface.  If you need to decode information differently, create a new class in /src/CentralApps/CAN/Decoder/Keys which extends the Decoder_Core class.  You will need to update the Decider_Factory to correctly build decoder keys of that type.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/4TQae4J_db8" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/processing-can-messages-in-php</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/processing-can-messages-in-php</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ AMQP Conference & 1.0 Launch - New York ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/svXWimR4RyQ/amqp-conference--10-launch--new-york</link>
         <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/26701119@N04/6237884423/sizes/l/in/photostream/"&gt;&lt;br /&gt;&lt;img style="float: right; margin: 5px !important;" src="http://www.michaelpeacock.co.uk/uploads/assets/large/6237884423_d1f734a419_m.jpg" alt="" /&gt;&lt;/a&gt;Today, myself and &lt;a href="http://www.samlambert.com"&gt;Sam Lambert&lt;/a&gt; were at the &lt;a href="http://www.amqp.org"&gt;4th Annual AMQP Conference and Launch&lt;/a&gt; of the version 1.0 of the protocol.  We were there representing &lt;a href="http://www.smithelectric.com"&gt;Smith Electric Vehicles&lt;/a&gt;, who use &lt;a href="http://www.stormmq.com"&gt;StormMQ&lt;/a&gt; a cloud based message queue (more on that in a forthcoming post about my work at Smith).  AMQP is the "Advanced Message Queueing Protocol" a protocol which is currently in the process of establishing itself as a formal standard through the &lt;a href="http://www.oasis-open.org/standards"&gt;OASIS group&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/svXWimR4RyQ" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/amqp-conference--10-launch--new-york</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/amqp-conference--10-launch--new-york</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ Speaking at PHPNW11 Unconference ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/sRwH7ucJXY0/speaking-at-phpnw11-unconference</link>
         <description>&lt;p&gt;This is just a quick note to say I'll be speaking at PHPNW 2011 in their Unconference track, delivering two 15 minute talks:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PHP and Continuous Data Processing&lt;/li&gt;
&lt;li&gt;PHP and Twilio&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;If you are at the conference, I hope to see you swing by for my talks.&lt;/div&gt;
&lt;h2&gt;PHP and Continuous Data Processing&lt;/h2&gt;
&lt;p&gt;At Smith Electric Vehicles, the worlds largest manufacturer of commercial electric vehicles, we run the largest telemetry system outside of Formula 1.  This telemetry system involves our vehicles transmitting thousands of pieces of information back to us every second.  We need to be able to process this information, keep on top of it, generate reports and calculations and display real-time, historical and analytical data through our web interface for customers, engineers and service technicians.  This talk discusses some of the challenges we face and some of the solutions we have both in terms of the system itself and also making PHP play nicely with large volumes of continuously processing information.&lt;/p&gt;
&lt;h2&gt;PHP and Twilio&lt;/h2&gt;
&lt;p&gt;Twilio is a set of Infrastructure APIs which allow developers to integrate voice and SMS services into their applications.  This includes receiving inbound calls, making outbound calls, transferring calls, processing responses and so on.  This talk walks quickly through Twilio and shows how to quickly build a telephone interface for customers to manage their accounts on PHP based systems.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/sRwH7ucJXY0" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/speaking-at-phpnw11-unconference</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/speaking-at-phpnw11-unconference</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ Multi-step form navigation jQuery plugin ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/gTDbTtY6Ho0/multistep-form-navigation-jquery-plugin</link>
         <description>&lt;p&gt;I was recently creating a system with a multi-step form.  The form itself wasn't particularly complicated, it just had a number of steps which the user needed to complete.  It didn't make sense for each stage of the form to be a seperate form which is posted to a server, and then fully processed at the end.  Instead, it seemed more appropriate to hide each section of the form, except for the current section being completed, using jQuery.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/gTDbTtY6Ho0" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/multistep-form-navigation-jquery-plugin</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/multistep-form-navigation-jquery-plugin</feedburner:origLink></item>
      
      <item>
         <title> - <![CDATA[ Equality South West - recent website release ]]></title>
         <link>http://feedproxy.google.com/~r/MichaelPeacockBlog/~3/OZZEE2PA0xM/equality-south-west--recent-website-release</link>
         <description>&lt;p&gt;&lt;img style="float: right;" src="http://www.michaelpeacock.co.uk/uploads/assets/large/esw-home-2.PNG" alt="" width="350" height="332" /&gt;One of my final few projects working &lt;a href="http://www.twitter.com/rich__thompson"&gt;with &lt;/a&gt;&lt;a href="http://www.twitter.com/iansmithsays"&gt;the&lt;/a&gt;&lt;a href="http://www.twitter.com/richardcarter"&gt; team &lt;/a&gt;at &lt;a href="http://www.peacockcarter.co.uk"&gt;Peacock Carter&lt;/a&gt; has come to a close, following a launch in mid-April, and I wanted to write up a post about the project and my involvement: the website redesign and redevelopment for &lt;a href="http://www.equalitysouthwest.org.uk/"&gt;Equality South West&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MichaelPeacockBlog/~4/OZZEE2PA0xM" height="1" width="1"/&gt;</description>
         <pubDate>{pub_date} GMT</pubDate>
         <guid isPermaLink="false">http://www.michaelpeacock.co.uk/blog/entry/equality-south-west--recent-website-release</guid>
      <feedburner:origLink>http://www.michaelpeacock.co.uk/blog/entry/equality-south-west--recent-website-release</feedburner:origLink></item>
      
   </channel>
</rss>
