<?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>My So Called Website</title>
	<atom:link href="http://www.delineneo.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.delineneo.com</link>
	<description>Rambles, musings, thoughts</description>
	<lastBuildDate>Tue, 06 Mar 2012 11:35:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Monitor your Jenkins build with an Arduino (and some Java code)</title>
		<link>http://www.delineneo.com/2012/03/06/monitor-your-jenkins-build-with-an-arduino-and-some-java-code/</link>
		<comments>http://www.delineneo.com/2012/03/06/monitor-your-jenkins-build-with-an-arduino-and-some-java-code/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 11:35:45 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1092</guid>
		<description><![CDATA[So I got my hands on an Arduino kit a while back but hadn&#8217;t played around with it much. Whilst I await for some books to arrive so I can learn basic electronics and circuits (am a developer without engineering/electronics &#8230; <a href="http://www.delineneo.com/2012/03/06/monitor-your-jenkins-build-with-an-arduino-and-some-java-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I got my hands on an Arduino kit a while back but hadn&#8217;t played around with it much. Whilst I await for some books to arrive so I can learn basic electronics and circuits (am a developer without engineering/electronics background&#8230;) I thought it&#8217;d be fun to see if I could write something simple that could be useful in my day to day job as a Java developer.</p>
<p>One of the tools we use is <a title="Jenkins" href="http://http://jenkins-ci.org/">Jenkins</a> and whilst we get emails and check the Jenkins Dashboard to see if a build has failed,  developers often have a tendency to not check their emails or check Jenkins to see what the state of the build is&#8230; As a result it may be hours or even a few days before someone realises the build is not passing&#8230;</p>
<p>So it seemed fitting to write some code to get a LED light to blink if the build is failing. To do this you&#8217;ll need the following:</p>
<ul>
<li>Jenkins with the build you want to monitor setup</li>
<li>Arduino (I&#8217;m using an Uno)</li>
<li>A LED (though for test purposes if you&#8217;re using an Uno pin 13 has a LED built in which should be sufficient)</li>
</ul>
<ol>
<li>Wire up your LED to one of the pins or do what I did and use the built in LED on pin 13.</li>
<li>Write some code in your language of choice to grab the build status from Jenkins and send it serially to the Arduino. I chose to grab the status as JSON, but there are <a href="https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API">other options available</a>. I used Java and the Spring Framework to schedule a process to run every 5 seconds to grab the Jenkins status and send it across to the Arduino with the main grunt work being the code below:
<pre class="brush: java; title: ;">
package com.delineneo.processor;

import com.delineneo.communication.SerialCommunicator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

import java.io.IOException;

import static org.apache.commons.lang.StringUtils.contains;

/**
 * Created by IntelliJ IDEA.
 * User: deline
 * Date: 2/03/12
 * Time: 8:33 PM
 */
@Component
public class JenkinsStatusProcessor {
    private static final String JENKINS_URL = &quot;http://localhost:8080/job/JenkinsStatus/api/json&quot; ;
    private static final String SUCCESS_BUILD_COLOR = &quot;blue&quot;;
    public static final char BUILD_FAIL = '0';
    public static final char BUILD_SUCCESS = '1';

    private RestTemplate restTemplate;
    private SerialCommunicator serialCommunicator;

    @Scheduled(fixedDelay=5000)
    public void process() {

        String jsonString = restTemplate.getForObject(JENKINS_URL, String.class);

        boolean buildSuccess = isBuildSuccessful(jsonString);
        try {
            serialCommunicator.send(buildSuccess ? BUILD_SUCCESS : BUILD_FAIL);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private boolean isBuildSuccessful(String jsonString) {
        if (contains(jsonString, SUCCESS_BUILD_COLOR)) {
            return true;
        }
        return false;
    }

    @Autowired
    public void setRestTemplate(RestTemplate restTemplate) {
        this.restTemplate = restTemplate;
    }

    @Autowired
    public void setSerialCommunicator(SerialCommunicator serialCommunicator) {
        this.serialCommunicator = serialCommunicator;
    }
}
</pre>
<p>In the <strong>process</strong> method we grab the status as JSON using Spring&#8217;s <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/client/RestTemplate.html">RestTemplate</a> then search for the build status colours in the string. Blue represents success and I treat any other colour (yellow and red are the other ones) as a failure. We then send either a &#8217;0&#8242; or &#8217;1&#8242; for fail or success respectively.</p>
<p>You might wonder why we send a char instead of a boolean&#8230; Serial write to the Arduino is as an int or byte array, and on the Arduino side read is done either as an int or a char. For example sending &#8216;A&#8217; will be received via the Arduino as either the char &#8216;A&#8217; or the int value 65 (the ascii value). This post on <a href="http://bildr.org/2011/01/arduino-serial/">bildr</a> gives you a bit more info on why one might choose to read values as and int instead of a char.</li>
<li>Write some code for the Arduino to process the received data and set the LED to flashing if the build has failed. The code below listens on the serial port:
<pre class="brush: cpp; title: ;">
/* JenkinsStatus will turn the LED at pin 13 on/off depending
 * on the value serially read.
 */
const int BUILD_SUCCESS = 49;
int inByte;
int currentPinValue = 0;

void setup() {
    Serial.begin(9600);
    pinMode(13, OUTPUT);
}

void loop() {
    if (Serial.available() &gt; 0) {
        inByte = Serial.read();
        if (inByte == BUILD_SUCCESS) {
            digitalWrite(13, LOW);
        } else{
            digitalWrite(13, HIGH);
        }
    } else {
        currentPinValue = digitalRead(13);
        if (currentPinValue == HIGH) {
            delay(1000);
            digitalWrite(13, LOW);
            delay(1000);
            digitalWrite(13, HIGH);
        }
    }
}
</pre>
<p>In the <strong>loop</strong> if there&#8217;s data to be read we read it then determine if what state the LED on pin 13 needs to be in. The pin needs to be LOW (i.e. off) if the build is passing and HIGH (on) otherwise. Additionally, if there is no data to be read we want to keep the LED in a flashing state if it was set to HIGH (last read indicated build had failed).</li>
</ol>
<p>So that&#8217;s pretty much the long short of it, the full code is available on my Git repo &#8211; <a href="https://github.com/deline/JenkinsStatus">https://github.com/deline/JenkinsStatus</a></p>
<p>Some thoughts on how JenkinsStatus could be improved:</p>
<ul>
<li>Allow config of Jenkins details via properties files</li>
<li>Allow more than one Jenkins job to be monitored</li>
<li>Put in more LEDs for other states</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2012/03/06/monitor-your-jenkins-build-with-an-arduino-and-some-java-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goodbye weekends hello house hunting &#8211; week 1</title>
		<link>http://www.delineneo.com/2011/03/06/goodbye-weekends-hello-house-hunting-week-1/</link>
		<comments>http://www.delineneo.com/2011/03/06/goodbye-weekends-hello-house-hunting-week-1/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 08:34:29 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1087</guid>
		<description><![CDATA[So the decision has been made to make the foray into the crazy realms of the Sydney real estate market, the objective to find a place to live in. So with that means a lot of spare time surfing domain.com.au &#8230; <a href="http://www.delineneo.com/2011/03/06/goodbye-weekends-hello-house-hunting-week-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So the decision has been made to make the foray into the crazy realms of the Sydney real estate market, the objective to find a place to live in. So with that means a lot of spare time surfing domain.com.au and weekends spent looking at &#8216;open for inspections&#8217;. Highlights for this week:</p>
<ul>
<li>House going under contract the night before were to check it out <img src='http://www.delineneo.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </li>
<li>Number 1&#8242;s still left in the kids potty in the bathroom</li>
<li>House&#8217;s that were in a terrible state &#8211; carpet that was frayed and separated, walls that were separating, paint jobs that looked like the person wasn&#8217;t even trying (it looked like outdoor paint too!)</li>
</ul>
<p>Let&#8217;s say it&#8217;s easily noticeable whether a property being sold is a rental or an owner occupied&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2011/03/06/goodbye-weekends-hello-house-hunting-week-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When social media works</title>
		<link>http://www.delineneo.com/2011/01/27/when-social-media-works/</link>
		<comments>http://www.delineneo.com/2011/01/27/when-social-media-works/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 09:14:36 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1083</guid>
		<description><![CDATA[Kudos to the @Optus social media team for utilising social media channels effectively to help their customers. I&#8217;ve had this ongoing saga for a few years where my internet drops out when the weather is extremely hot (around 35+ degrees &#8230; <a href="http://www.delineneo.com/2011/01/27/when-social-media-works/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Kudos to the <a href="http://twitter.com/optus">@Optus</a> social media team for utilising social media channels effectively to help their customers. I&#8217;ve had this ongoing saga for a few years where my internet drops out when the weather is extremely hot (around 35+ degrees Celsius). And with this many horrible experiences of Optus customer support &#8211; being on hold for 1+ hour then dropped out of the phone queue, passed between many departments, technicians not turning up because tech support decided there wasn&#8217;t an issue and cancelling the booking yet the next support person could clearly see the issue was still there based on the modem logs. After 3 or so call outs a new modem was provided about a year ago but since then there hasn&#8217;t really been a bunch of extremely hot days in a row.</p>
<p>Until yesterday&#8230; and woah behold when I came home in the evening no internet. Just the same flashing light sequence I&#8217;m more than familiar with. Usual tricks didn&#8217;t work and I was dreading having to call Optus tech support&#8230; Have you even been asked if you&#8217;ve power cycled you&#8217;re modem 3 times after you&#8217;ve already said yes twice? Not to mention the stuff arounds last time as mentioned above. So when it still didn&#8217;t work this morning, it was time to take to Twitter as I knew Optus have an account they they respond to.</p>
<p>Posted on the way to work, and got a reply within a few hours, and after providing a bit more info a guy from the social media team rang me &#8211; yes a real person! Turns out there were some issues which they knew about but with no ETA (odd that there network status page didn&#8217;t say anything). Anyways he said he&#8217;d try to keep my in the loop either via Twitter or ring me, and I got a phone call with an update in the afternoon that the issue had been fixed but there was someone else on my street experiencing the same issue so if it wasn&#8217;t fixed when I got home to get in touch. As I don&#8217;t get home till after the social media team finish for the day the guy updated the account notes with details in case I had to ring tech support for further help (tech support is offshore). Got home and lucky for me the internet was working again. Was it heat related? Don&#8217;t know the real answer but I wouldn&#8217;t be surprised if it was. The cables running from the house have to tap to the main line, so extreme heat could cause connector issues with expansion and all of joins.</p>
<p>That all aside, I was very happy with the customer service and give a +1 to Optus for embracing social media. The internet has reinvented the way people work, communicate and share. Businesses need to recognise and embrace these changes/technologies as they&#8217;re not going to go away. Operating models change over time and Optus is proving that they can address customer service in ways different from traditional means. Will customer service/support by social media become mainstream? Probably not, but it&#8217;s a market they have to catch as increasingly more people turn to the web for their needs (e.g. the whole online shopping debacle).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2011/01/27/when-social-media-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wisdoms from a fortune cookie</title>
		<link>http://www.delineneo.com/2011/01/24/wisdoms-from-a-fortune-cookie/</link>
		<comments>http://www.delineneo.com/2011/01/24/wisdoms-from-a-fortune-cookie/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 07:40:50 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1080</guid>
		<description><![CDATA[Fortune cookie words of wisdom are awesome.. these are a few of late (not that I make a habit of eating fortune cookies or anything :-p ) There will be no harm in asking If you put little effort in &#8230; <a href="http://www.delineneo.com/2011/01/24/wisdoms-from-a-fortune-cookie/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Fortune cookie words of wisdom are awesome.. these are a few of late (not that I make a habit of eating fortune cookies or anything :-p )</p>
<ul>
<li><em>There will be no harm in asking</em></li>
<li><em>If you put little effort in a task you can expect very little success</em></li>
<li><em>You will be singled out for promotion<br />
</em></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2011/01/24/wisdoms-from-a-fortune-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple RegEx and Closure example in Groovy</title>
		<link>http://www.delineneo.com/2011/01/15/simple-regex-and-closure-example-in-groovy/</link>
		<comments>http://www.delineneo.com/2011/01/15/simple-regex-and-closure-example-in-groovy/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 11:58:54 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1051</guid>
		<description><![CDATA[I&#8217;ve been intermittently reading Groovy in Action for the last few nights and whilst it all seems pretty straight forward, for me the real grasping of an understanding comes by writing some code to affirm what was read. That posed &#8230; <a href="http://www.delineneo.com/2011/01/15/simple-regex-and-closure-example-in-groovy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been intermittently reading <a href="http://www.amazon.com/Groovy-Action-Dierk-Koenig/dp/1932394842">Groovy in Action</a> for the last few nights and whilst it all seems pretty straight forward, for me the real grasping of an understanding comes by writing some code to affirm what was read. That posed the dilemma of what to write, as since leaving uni most of my learning experiences in Java (and development concepts in general) have been in relation to real world business style scenarios. I gave a thought back to my high school days where I learnt how to program. Why not just start with a somewhat simple/trivial problem &#8211; e.g. a factorial calculator, or sentence word reverser and go from there? Sure it&#8217;s not anything too swish, but it seems a good way to get an understanding of the language.</p>
<p>So here I present a simple solution in Groovy that uses RegEx and Closures to captalise the first letter of each word in a string. I&#8217;ll also show you an even neater solution after&#8230;.</p>
<p>First up:</p>
<pre class="brush: groovy; title: ;">

String testString = 'the quick brown fox jumped over the lazy dog'
String regex = /\b\w*\s?\b/

testString.eachMatch(regex) { match -&gt;
    print match.capitalize()
}
</pre>
<p>Lines 1 and 2 should be pretty self explanatory. We&#8217;ve based our regex of the basis that a word consists of word characters only, may have a space after the last word character and has a word boundary on either side.</p>
<p>Lines 4-6 is where the cool stuff happens, as for each word match we make we want to upper case the first letter and print it out. The method <strong>eachMatch</strong> takes two arguments a String regex and a closure. From the <a href="http://groovy.codehaus.org/Closures">Groovy docs</a> &#8211; <em>&#8216;A Groovy Closure is like a &#8220;code block&#8221; or a method pointer. It is a  piece of code that is defined and then executed at a later point.&#8217;</em> In the example above we have defined the closure inline with one parameter <strong>match</strong> &#8211; parameters are listed before the <strong>-&gt;</strong>. The closure calls <strong>capitalize</strong> on the match and prints it out.</p>
<p>We could have easily defined the closure separatley and provided it to <strong>eachMethod</strong> as such:</p>
<pre class="brush: groovy; title: ;">
Closure capitalize = { match -&gt; print match.capitalize() }
testString.eachMatch(regex, capitalize)
</pre>
<p>Seems pretty easy right? Not many lines of code and quite succinct about what is happening. Well as is often the case, I did a little Google and here&#8217;s an even easier solution:</p>
<pre class="brush: groovy; title: ;">
String testString = 'the quick brown fox jumped over the lazy dog'
print testString.split(' ').collect{ it.capitalize() }.join(' ')
</pre>
<p>In the end my solution was a first attempt into using Groovy to solve a problem without having much exposure to the language whilst at the same time trying not to use my Java mindset. After seeing the alternative solution on the Internet it kind of shows that if you know what to use Groovy can make things even simpler as it&#8217;s definitely cleaner without using the RegEx.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2011/01/15/simple-regex-and-closure-example-in-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Groovy on a Mac</title>
		<link>http://www.delineneo.com/2011/01/13/installing-groovy-on-a-mac/</link>
		<comments>http://www.delineneo.com/2011/01/13/installing-groovy-on-a-mac/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 10:37:42 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1043</guid>
		<description><![CDATA[Having heard about Groovy and Grails for the last few years but not having actually had a look at it I installed Groovy on my Mac the other week for a bit of a play. It&#8217;s always good and fun &#8230; <a href="http://www.delineneo.com/2011/01/13/installing-groovy-on-a-mac/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having heard about Groovy and Grails for the last few years but not having actually had a look at it I installed Groovy on my Mac the other week for a bit of a play. It&#8217;s always good and fun to have a look at a different language even if if you&#8217;re not going to use it in your day to day job. Coming from predominantly a Java background Groovy seemed like a good choice as it runs on the Java platform and the language is similar. Having had the opportunity to use Objective-C for a few months last year and seeing how in some ways it was more powerful than Java (but also in other ways frustrating), I was curious to see what power Groovy gave to a developer.</p>
<p>The first step though was to get Groovy installed on my Mac. So I thought I&#8217;d put a post up mainly for anyone new to developing on a Mac. Whilst I&#8217;ve had my Mac for a year or so, I hadn&#8217;t really had it setup for anything other than Java until recently, and there were definitely some things that were a little different to what I was used to on Windows as well from my prior limited stint in Ubuntu land.</p>
<p>These instructions are based on a setup for OS X. I&#8217;d imagine the setup may be similar on any other version?</p>
<ol>
<li>Java should already be installed on your machine. Confirm this by opening up a Terminal and typing in &#8216;<strong>java -version</strong>&#8216;.</li>
<li>Download the binary Zip release of Groovy <a href="http://groovy.codehaus.org/">from the Groovy site</a>.</li>
<li>Extract the contents into <strong>/usr/local</strong> &#8211; e.g. my install location is <strong>/usr/local/groovy-1.7.6/</strong>. You will probably need to need to use the <strong>sudo</strong> command for the extract as you will need to be superuser to write to the location.</li>
<li>Check if a file called <strong>environment.plist</strong> exists in the following location <strong>/Users/YOUR_USER_NAME/.MacOSX</strong>. If it doesn&#8217;t create it.</li>
<li>Open environment.plist in the Property List Editor</li>
<li>Add an entry for <strong>JAVA_HOME</strong> if not present, ensure the value is the location of your Java installation. This should be <strong>/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home</strong></li>
<li>Add an entry for <strong>GROOVY_HOME</strong> if not present and ensure the value is the location Groovy is installed. E.g. <strong>/usr/local/groovy-1.7.6</strong></li>
<li>Add an entry for <strong>PATH</strong> if not present, and ensure the Groovy bin and Java bin directories are present by adding  <strong>$JAVA_HOME:$GROOVY_HOME/bin</strong></li>
<li>Log out and re log back in for the changes to take effect.</li>
<li>Check that everything is all setup correctly by opening a Terminal and running <strong>groovy -version</strong> which should show you which version of Groovy is installed.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2011/01/13/installing-groovy-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online shopping, intentional GST loophole or convenience?</title>
		<link>http://www.delineneo.com/2011/01/06/online-shopping-intentional-gst-loophole-or-convenience/</link>
		<comments>http://www.delineneo.com/2011/01/06/online-shopping-intentional-gst-loophole-or-convenience/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 10:22:59 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1038</guid>
		<description><![CDATA[So over the last few weeks, there&#8217;s been a bit of an uproar over the fact that GST is not applicable for overseas online purchases under $1000. Some of the bigger sized retailers have even gone on a campaign saying &#8230; <a href="http://www.delineneo.com/2011/01/06/online-shopping-intentional-gst-loophole-or-convenience/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So over the last few weeks, there&#8217;s been a bit of an <a href="http://www.smh.com.au/business/fury-at-online-gst-loophole-20101219-191zt.html">uproar over the fact that GST is not applicable for overseas online purchases under $1000</a>. Some of the bigger sized retailers have even gone on a campaign saying that it is <a href="http://www.couriermail.com.au/business/billionaire-gerry-harveys-complaints-about-online-shopping-like-goliath-pretending-to-be-david-in-retailing-war/story-e6freqmx-1225981608929">unfair to local retailers</a>. But are we really shopping online intentionally to avoid the GST or are there other factors behind it?</p>
<p>Seemingly the internet is against what Mr Harvey is saying, the term &#8216;<a href="http://twitter.com/#!/search/Dear%20Gerry%20Harvey">Dear Gerry Harvey</a>&#8216; even making one of the top local trends for Twitter and I actually agree with the majority in this respect. Sure I do shop online (internationally and locally), but I also do shop in traditional bricks and mortar stores as well.</p>
<p>What makes me shop online? It&#8217;s definitely not because I don&#8217;t have to pay GST on my international purchases. In fact I couldn&#8217;t really care less if the GST was slapped onto my international purchases as it wouldn&#8217;t have played much of a difference in the end anyway. The reasons I shop online are pretty straightforward:</p>
<ul>
<li><strong>Price is significantly cheaper.</strong> And by this I mean an amount big enough to make it worthwhile. If this is the only factor in the purchase, GST plays little part, as tacking on 10% for the import is going to make little difference if anything. E.g. 10% of $1000 is $100, but if you&#8217;re saving 50%, you&#8217;re still $400 better off. If the end saving is only a small margin say $100 or less (in the case of international purchases), I often will just end up buying it from a local retailer, as it&#8217;s too much effort with shipping, delivery, extra charges etc.</li>
<li><strong>Product range.</strong> Let&#8217;s face it most of the goods stocked by retailers in Australia don&#8217;t cover a wide range. E.g. walk into any brand name technology retailer and they most likely won&#8217;t have the most recent products on display/sale, or with clothing try finding petite sized clothing in Australia, again a limited range.</li>
<li><strong>Customer service.</strong> I choose to avoid certain stores where I can because customer service is poor or missing. Lack of staff to help with purchases, staff who don&#8217;t know what they&#8217;re trying to sell, staff who just want their commission. E.g. I was in a major sport retailer in the past year needing to buy some soccer gear. I checked the product out myself, picked my size myself then a staff member comes over asking if I need help. I decline and let them know I&#8217;m okay as I&#8217;ve already worked out what size was right. They then proceed to stick their &#8216;sticker&#8217; on the box, so when I purchase the sale gets credited to them (even though they clearly did not help me in deciding on my purchase).</li>
<li><strong>Convenience.</strong> Why would I go to a physical store if I know exactly what I want and can buy it online and get it delivered in the next 1-2 days? This is especially true if any of the above listed factors also apply. And this is not just for international purchases, as I&#8217;ve purchased from local retailers online before mainly because of the price and product range factors. And let&#8217;s bear in mind that I do pay GST for these purchases.</li>
</ul>
<p>And whilst I have listed the above factors for online shopping I do have experiences where I have chosen to go to a physical retailer/store because my past experiences were positive. Sure I may be paying a little more in the end, but I leave a happy customer and the experience was better than had I done it online.</p>
<p>I think the big retailers need to reassess their operating model and the market they are operating in today. It&#8217;s vastly different to 10 years ago with the uptake and advent of technology. And it&#8217;s not not possible as there are many local retailers out there (some even with physical stores), who are surviving and have got my business if I need to look for a certain product. They&#8217;ve served me well each time, so why would I change and spend my time hunting across Sydney for a particular product?</p>
<p>And let&#8217;s face it, it&#8217;s not just online shopping that is taking a chunk of the big retailers customer base. Pick any digital camera on sale at a big retailer in the Sydney CBD. Go to all the major retailers in the CBD area (between Town Hall and Circular Quay), and check their prices. Now go visit all the other stores in the same area that sell digital cameras. I guarantee you will find a better deal in an actual store for either a newer or the same model.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2011/01/06/online-shopping-intentional-gst-loophole-or-convenience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy integration with Spring Integration</title>
		<link>http://www.delineneo.com/2010/12/30/easy-integration-with-spring-integration/</link>
		<comments>http://www.delineneo.com/2010/12/30/easy-integration-with-spring-integration/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 10:22:31 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.delineneo.com/?p=1007</guid>
		<description><![CDATA[So I&#8217;ve had the opportunity to use Spring Integration recently and I thought I&#8217;d do a blog post about it &#8211; partly for my own review/recap/learning but also for anyone out there looking to play around with it. In a &#8230; <a href="http://www.delineneo.com/2010/12/30/easy-integration-with-spring-integration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve had the opportunity to use <a href="http://www.springsource.org/spring-integration">Spring Integration</a> recently and I thought I&#8217;d do a blog post about it &#8211; partly for my own review/recap/learning but also for anyone out there looking to play around with it. In a nutshell Spring Integration lets you integrate with other systems without having to deal with all the boilerplate concerns of your typical enterprise integration solutions. It provides a <a href="http://static.springsource.org/spring-integration/docs/2.0.0.RELEASE/reference/htmlsingle/#spring-integration-adapters">number of integration adapters straight out of the box</a> for common integration methods such as: files, jms, jdbc, ftp and so on (take a look at the Spring doco for the full set).</p>
<p>The general gist of things has you defining a series of channels of which the endpoint may be the entry or exit to the system. One endpoint may be the entry point to another channel. E.g. in the following A&lt;&#8212;&#8212;&#8211;&gt;B is a channel with A as the input and B as the output endpoints. B&lt;&#8212;&#8212;&#8211;&gt;C is another channel where the output B from the A&lt;&#8212;&#8212;&#8211;&gt;B channel is the input and C the output.</p>
<p>A&lt;&#8212;&#8212;&#8211;&gt;B&lt;&#8212;&#8212;&#8211;&gt;C</p>
<p>To really see how it all hangs together I&#8217;ve knocked together a little working example to integrate with Twitter using the built in Twitter Adapter. The app basically polls Twitter with a search on a hashtag, adds a field to the header then passes the message on to a service to be dealt with &#8211; in this case we are just going to print out to System.out. Sounds complicating, but Spring makes it easy &#8211; take a look at src/main/resources/twitter-integration.xml.</p>
<pre class="brush: xml; title: ;">
&lt;channel id=&quot;inboundMentionsChannel&quot;/&gt;
&lt;channel id=&quot;inputServiceActivatorChannel&quot;/&gt;
</pre>
<p>This defines the channels, note that we haven&#8217;t actually specified what the endpoints are yet&#8230;</p>
<pre class="brush: xml; title: ;">

 &lt;twitter:search-inbound-channel-adapter query=&quot;#springintegration&quot; channel=&quot;inboundMentionsChannel&quot;&gt;
 &lt;poller fixed-rate=&quot;5000&quot; max-messages-per-poll=&quot;3&quot;/&gt;
 &lt;/twitter:search-inbound-channel-adapter&gt;

 &lt;header-enricher input-channel=&quot;inboundMentionsChannel&quot; output-channel=&quot;inputServiceActivatorChannel&quot;&gt;
 &lt;header name=&quot;headerField1&quot; value=&quot;dummy header value&quot;/&gt;
 &lt;/header-enricher&gt;
</pre>
<p>This is the interesting stuff where we link all the endpoints and channels together. Lines 1-3 define the inbound adapter (endpoint) which connects the system with Twitter. This is a search-inbound-adapter that polls for a twitter search using the specified query &#8211; in this case the hashtag #springintegration.</p>
<p>Lines 4-7 defines a header enricher. This allows us to pop values into the message header that can be used downstream. For this example we&#8217;re just populating a field called &#8216;headerField1&#8242; with a dummy value. We&#8217;re not actually going to use this field for anything in the example but I wanted to show how easy it was to add info to the message header. The header enricher also has an input channel and output channel specified. As you may have worked out the input to the header enricher is from the endpoint of the &#8216;inboundMentionsChannel&#8217;, which in this case will contain the results from the Twitter search. And the outbound channel is to a service activator which references the TwitterService bean (bean is autowired).</p>
<p>If you take a look at TwitterService.java you&#8217;ll see that it prints out to System.out and adds the tweet to a list. Running the test case TwitterIntegrationTest.java you can check that the output matches the expected tweet search result count of 3.</p>
<p><a href="http://www.delineneo.com/wp-content/uploads/2010/12/twitter-integration.zip">twitter-integration.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2010/12/30/easy-integration-with-spring-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to WordPress</title>
		<link>http://www.delineneo.com/2010/12/23/back-to-wordpress/</link>
		<comments>http://www.delineneo.com/2010/12/23/back-to-wordpress/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 12:23:26 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://delineneo.com/?p=981</guid>
		<description><![CDATA[So after a bit of procrastination I finally bit the bullet and attempted the migration of my website back to using WordPress as the CMS. For those tech dudes out there, or those who follow my happenings, you might remember &#8230; <a href="http://www.delineneo.com/2010/12/23/back-to-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So after a bit of procrastination I finally bit the bullet and attempted the migration of my website back to using WordPress as the CMS. For those tech dudes out there, or those who follow my happenings, you might remember I started out on Blogger, migrated to WordPress than on to Drupal. My main reason for moving back to WordPress is that whilst Drupal was awesome as a CMS I predominantly use my website to blog, and for that WordPress  excels. If I had to run a fully fledged website, I&#8217;d definitely fall back to Drupal though as there are things that it excels at there.</p>
<p>I&#8217;d put off the migration for ages as there is no quick and easy way to migrate from Drupal to WordPress. You have no choice but to run SQL commands. On top of that I still had my original WordPress blog that I wanted to &#8216;keep&#8217;. I&#8217;d never bothered to migrate these into my Drupal site, but now I was going back to WordPress I wanted them all in the same site.</p>
<p>So for anyone on the web thinking of making the move back (or to)&#8230; here are the steps that I followed&#8230; Do make sure you take a backup of your database before hand though, as whilst these steps seemed to work successfully for me, they may not necessarily work for everyone. Hence take these steps as a guide only&#8230;</p>
<ol>
<li>Take a look at <a title="Permanent Link to Convert – Import A Drupal 6 Based Website To WordPress v2.7" rel="bookmark" href="http://socialcmsbuzz.com/convert-import-a-drupal-6-based-website-to-wordpress-v27-20052009/">Convert – Import A Drupal 6 Based Website To WordPress v2.7</a> and follow the instructions there. Some differences for my setup is that I installed WordPress (Version 3.0.3) instead and didn&#8217;t bother to delete the Drupal tables as I was going to get my data back into Prod a different way.</li>
<li>Check your development WordPress install and ensure it looks right</li>
<li>OPTIONAL STEP: If you have a previous WordPress site that you want to keep content from as well, use the Export function in the previous install to download a WordPress export file. Import this into your new WordPress site using the Import function.</li>
<li>On your development WordPress use the Export function to download a WordPress export file. This export files will contain all the data you want to use in your new site. E.g. in my case this was all my Drupal content plus the content from my original WordPress site.</li>
<li>Install WordPress to your Production server</li>
<li>Use the Import functionality to import the export file you downloaded in Step 4.</li>
<li>Check that your Production WordPress looks correct.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2010/12/23/back-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.delineneo.com/2010/12/23/hello-world/</link>
		<comments>http://www.delineneo.com/2010/12/23/hello-world/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 11:30:45 +0000</pubDate>
		<dc:creator>Del</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://delineneo.com/?p=1</guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.delineneo.com/2010/12/23/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

