My So Called Websitehttp://delineneo.com
Rambles, musings, thoughtsSat, 14 Mar 2015 06:00:10 +0000en-UShourly1http://wordpress.org/?v=4.1.1About 1800 mileshttp://delineneo.com/2015/03/about-1800-miles/
http://delineneo.com/2015/03/about-1800-miles/#commentsSat, 14 Mar 2015 06:00:10 +0000http://delineneo.com/?p=1177
]]>http://delineneo.com/2015/03/about-1800-miles/feed/0My Great Alaskan Adventure (and more!)http://delineneo.com/2015/03/my-great-alaskan-adventure-and-more/
http://delineneo.com/2015/03/my-great-alaskan-adventure-and-more/#commentsSun, 01 Mar 2015 10:01:56 +0000http://delineneo.com/?p=1170Continue reading My Great Alaskan Adventure (and more!)→]]>So in 87 days (no I’m not counting… okay maybe just a teeny little bit) we’ll be heading off for 2 months on what I like to term ‘My Our Great Alaskan Adventure’. Which is a bit of a confusing title seeing we will be spending more time in the Lower 48.

My bucket list includes visiting as many of the U.S. National Parks as I can, and Alaska has been high on that list ever since I first got sucked into the parks system when visiting Zion National Park back in 2008.

So in late May we’ll depart for another road trip adventure (this time with cruise) to tick off (and hike!) the following parks:

Glacier Bay NP

Denali NP

Kenai Fjord NP

Olympic NP

Mount Rainier NP

Crater Lake NP

Redwood NP

Lassen Volcanic Park

Oh and of course a few days at Disney as I’m a sucker for that as well.

]]>http://delineneo.com/2015/03/my-great-alaskan-adventure-and-more/feed/0Adventures with Swift and unit testinghttp://delineneo.com/2014/08/adventures-with-swift-and-unit-testing/
http://delineneo.com/2014/08/adventures-with-swift-and-unit-testing/#commentsSun, 17 Aug 2014 10:21:17 +0000http://www.delineneo.com/?p=1166Continue reading Adventures with Swift and unit testing→]]>Firstly, it’s been a long time with no blog. Life, the universe kind of caught up with me. That and I think blogging for a number of years in my late teens/early twenties kind of got the better of me… But from now on, let’s see how this blogging stuff goes. Hopefully it’ll be a place for me to brain dump my thoughts and learnings… Which brings me onto the topic of this post ‘Adventures with Swift and unit testing’.

Bit of background, about 5 years ago in my previous job I was part of an ios development team. Things were different back then. Where I worked didn’t practice TDD and the testing landscape was fairly immature with respect to mobile development.

Fast forward to the present and I work at place that does TDD and tooling/frameworks for testing ios development has vastly improved. It’s still somewhat behind what I’m used to as a Java developer, but we need to bear in mind the mobile ecosystem/environment is still relatively new in the timeframe of things (the first iPhone was only released in 2007).

At WWDC 2014 Swift was introduced. I’ve read a bit here and there, but I’m finally getting round to giving it a try – TDD style. With Xcode 6 beta 4 access controls has been introduced which has provided a bit of an interesting situation with unit testing.

Access controls come in 3 flavours:

Public – as it states, accessible from it’s own module as well as any other code that imports the said module. Pretty much more or less the same as public in Java.

Internal – Only accessible within the defined module. Somewhat similar to package private in Java.

Private – Only accessible via the defining source code. Pretty much the same as private in Java.

What’s interesting is that by following good practices of encapsulation using the above access levels brings about some interesting implications for unit testing. This comes about because in ios developer a test target is not part of the applications module and thus cannot see anything that is not marked public. This is particularly frustrating as in Java something marked package private can still be accessed/seen in the test tree when in the same package.

The beta release notes actually state:

A limitation of the access control system is that unit tests cannot interact with the classes and
methods in an application unless they are marked public. This is because the unit test target is
not part of the application module.

Can this be worked around? Somewhat so… At the moment you could mark everything as public, but that seems rather unfortunate as it pretty much bypasses any encapsulation. Add the class under test to your unit test target.

Interestingly enough, on the developer forums Chris Lattner has posted that they know the access control design doesn’t really work for unit testing…

]]>http://delineneo.com/2014/08/adventures-with-swift-and-unit-testing/feed/010 years of blogging?!?http://delineneo.com/2012/11/10-years-of-blogging/
http://delineneo.com/2012/11/10-years-of-blogging/#commentsWed, 21 Nov 2012 08:24:40 +0000http://www.delineneo.com/?p=1136Continue reading 10 years of blogging?!?→]]>Edit: So this was attempt 2 of this post. Thank goodness for Google cache! Don’t start a migration to a new server whilst still updating your site

So after having my WordPress install nag at me to update for ages, I finally got round to it. Also took the opportunity to clean up my FTP directory which has had bits and pieces lying around for years.

With this update, we now have a new theme, some nice random header images and Archives! I took a quick look at it and realised I’ve been blogging off and on for the last decade! I remember starting back on Blogger back in the day and then migrating to WordPress. Those blog posts from back then didn’t migrate that well, hence the numbers as post titles. And I also think I’m possibly missing a few weeks or months of the very start of my blogging foray…

From WordPress was the migration to Drupal where I blogged periodically for a number of years and then the painful migration back. It’s just a little bit crazy to know I’ve still basically got 10 years of posts intact! There’s a couple of years in between where the posting is sporadic, but hopefully I’ll keep this guy more up to date with my ramblings, musings and thoughts.

]]>http://delineneo.com/2012/11/10-years-of-blogging/feed/0Objective-C Feature Availabilityhttp://delineneo.com/2012/10/objective-c-feature-availability/
http://delineneo.com/2012/10/objective-c-feature-availability/#commentsSun, 28 Oct 2012 05:41:23 +0000http://www.delineneo.com/?p=1127Just a quick follow up to the last post. Here’s a link to the Apple docs on the Objective-C Feature Availability. Is worth a look if you haven’t dabbled in a while…
]]>http://delineneo.com/2012/10/objective-c-feature-availability/feed/0Objective C, Xcode revistedhttp://delineneo.com/2012/10/objective-c-xcode-revisted/
http://delineneo.com/2012/10/objective-c-xcode-revisted/#commentsWed, 10 Oct 2012 12:06:49 +0000http://www.delineneo.com/?p=1123Continue reading Objective C, Xcode revisted→]]>It’s been a few years since I’ve written in Objective C for iOS and used Xcode, and I must say it has changed/matured a lot since then.

The first time, thrown into the middle of an intense project, was a crash course in the intricacies of the language and IDE. And being mainly a Java front end dev back then with very limited C experience was interesting to say the least.

But I’m glad to say that alot has changed since then, and for the better. After giving some documentation a once over and playing around with things, lots of the oddities that I saw coming to the language as a Java developer have now been improved.

The biggest things for me (so far) I think were:

Automatic synthesizing of properties.

Automatic reference counting (ARC). It puzzled me that writing code for the OS had memory management, but you had to manually manage for iOS.

Setting up your project with unit tests is a breeze.

There are other things, and if you haven’t looked at it in a while you might be pleasantly surprised.

]]>http://delineneo.com/2012/10/objective-c-xcode-revisted/feed/0Test post from iPadhttp://delineneo.com/2012/07/test-post-from-ipad/
http://delineneo.com/2012/07/test-post-from-ipad/#commentsSat, 14 Jul 2012 05:04:36 +0000http://www.delineneo.com/2012/07/14/test-post-from-ipad/Testing posting from WordPress app for iPad…
]]>http://delineneo.com/2012/07/test-post-from-ipad/feed/0Monitor your Jenkins build with an Arduino (and some Java code)http://delineneo.com/2012/03/monitor-your-jenkins-build-with-an-arduino-and-some-java-code/
http://delineneo.com/2012/03/monitor-your-jenkins-build-with-an-arduino-and-some-java-code/#commentsTue, 06 Mar 2012 11:35:45 +0000http://www.delineneo.com/?p=1092Continue reading Monitor your Jenkins build with an Arduino (and some Java code)→]]>So I got my hands on an Arduino kit a while back but hadn’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…) I thought it’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.

One of the tools we use is Jenkins 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… As a result it may be hours or even a few days before someone realises the build is not passing…

So it seemed fitting to write some code to get a LED light to blink if the build is failing. To do this you’ll need the following:

Jenkins with the build you want to monitor setup

Arduino (I’m using an Uno)

A LED (though for test purposes if you’re using an Uno pin 13 has a LED built in which should be sufficient)

Wire up your LED to one of the pins or do what I did and use the built in LED on pin 13.

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 other options available. 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: [sourcecode language=”java”]
package com.delineneo.processor;

In the process method we grab the status as JSON using Spring’s RestTemplate 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 ‘0’ or ‘1’ for fail or success respectively.

You might wonder why we send a char instead of a boolean… 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 ‘A’ will be received via the Arduino as either the char ‘A’ or the int value 65 (the ascii value). This post on bildr gives you a bit more info on why one might choose to read values as and int instead of a char.

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:
[sourcecode language=”cpp”]
/* 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;

In the loop if there’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).

]]>http://delineneo.com/2012/03/monitor-your-jenkins-build-with-an-arduino-and-some-java-code/feed/0Goodbye weekends hello house hunting – week 1http://delineneo.com/2011/03/goodbye-weekends-hello-house-hunting-week-1/
http://delineneo.com/2011/03/goodbye-weekends-hello-house-hunting-week-1/#commentsSun, 06 Mar 2011 08:34:29 +0000http://www.delineneo.com/?p=1087Continue reading Goodbye weekends hello house hunting – week 1→]]>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 ‘open for inspections’. Highlights for this week:

House going under contract the night before were to check it out

Number 1’s still left in the kids potty in the bathroom

House’s that were in a terrible state – carpet that was frayed and separated, walls that were separating, paint jobs that looked like the person wasn’t even trying (it looked like outdoor paint too!)

Let’s say it’s easily noticeable whether a property being sold is a rental or an owner occupied…

]]>http://delineneo.com/2011/03/goodbye-weekends-hello-house-hunting-week-1/feed/0When social media workshttp://delineneo.com/2011/01/when-social-media-works/
http://delineneo.com/2011/01/when-social-media-works/#commentsThu, 27 Jan 2011 09:14:36 +0000http://www.delineneo.com/?p=1083Continue reading When social media works→]]>Kudos to the @Optus social media team for utilising social media channels effectively to help their customers. I’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 – 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’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’t really been a bunch of extremely hot days in a row.

Until yesterday… and woah behold when I came home in the evening no internet. Just the same flashing light sequence I’m more than familiar with. Usual tricks didn’t work and I was dreading having to call Optus tech support… Have you even been asked if you’ve power cycled you’re modem 3 times after you’ve already said yes twice? Not to mention the stuff arounds last time as mentioned above. So when it still didn’t work this morning, it was time to take to Twitter as I knew Optus have an account they they respond to.

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 – 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’t say anything). Anyways he said he’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’t fixed when I got home to get in touch. As I don’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’t know the real answer but I wouldn’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.

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’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’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).