10 Nov 2015
Something I tend to be doing more often, is creating a standalone Nancy server and with each of them, I setup a lot of the same boilerplate code. So I thought I would put together what that setup looks like and throw the code up on GitHub.
This is an opinionated setup using the following packages: Nancy, Autofac, Serilog, ConfigInjector
Starting with a new empty web application in Visual Studio 2015:
Then add the initial nuget packages:
Next, implement the Autofac Bootstrapper for Nancy by adding a class called Bootstrapper.cs and implement the AutofacNancyBootstrapper:
public class Bootstrapper : AutofacNancyBootstrapper
protected override void ConfigureApplicationContainer(ILifetimeScope existingContainer)
var builder = new ContainerBuilder();
Finally create a NancyModule class for the endpoint:
public class SampleEndpoint : NancyModule
public SampleEndpoint() : base("/sample")
Get["/"] = _ => GetSampleData();
private Response GetSampleData()
return "hello world";
Now if you run up the application, and navigate to the sample endpoint, you should get the hello world response.
30 Jun 2011
After borrowing a colleagues Microsoft Arc Mouse last year I ended up buying several of them and have been using them exclusively since, so when the Microsoft Arc Touch Mouse came out a few weeks ago I had to get my hands on one and take it for a spin. First impressions of the mouse is how flat it folds. The Arc Mouse when folded goes into a bit of a ball, but the Arc Touch folds complete flat and is only a couple of millimetres thick. Its super slim design is what really makes you sit up and notice, folding completely flat it has been built with portability in mind easily fitting into a pocket or the sleeve on the front of my laptop bag. When you first start taking it for a run, then next thing you notice is how lightweight it is. This is one of the reasons I loved the Arc Mouse and this does not disappoint. The USB receiver for the mouse is tiny and the underside of the mouse itself has a magnetic strip which allows you to simply stick the received to the bottom when packing it away. The one thing I don’t like about the Arc Mouse is that I run through the batteries pretty quickly. Unfortunately this is partly my fault as I keep forgetting to close the mouse which turns it off, but the new Arc Touch turns off when you fold it flat which I seem to be doing more often which I put down to the design. So far I’ve only had the mouse a couple of weeks so time will tell how the battery life compares.
So after a couple of week of usage, I have found that the mouse is not as comfortable to use as the Arc Mouse. Part of this I suspect is due to its lightweight design. Instead of having a middle button or a scroll wheel, as the name suggests the Arc Touch has a touch scroll area. This provides a vibration feedback as you swipe your finger up and down to scroll. Initially I thought this would be just a novelty, but as you start to use if, I’ve found it to be quite useful. The touch area not only works as a scroll wheel, but also as a middle click operation and also allows you page up and page down by clicking the top or bottom of the touch area. Scrolling works really well, but unfortunately I’ve struggled to master the middle click or the page up and page down functionality of the touch area. This feature has been very hit and miss for me.
When the Touch Mouse was first released, it was selling for around $80 which made it about double the price of the Arc Mouse, but a quick search today has them selling for about $50 making it only $10 more now. All in all I still think my day to day mouse will remain the Arc Mouse, but for a more portable solution the design and size of the Arc Touch make it a very close second.
19 May 2011
A few weeks ago I went to the NZALM conference in Wellington and next week I’m off to Bali, so I thought I’d try to gather a few tips and tricks for overseas business travel.
Firstly, when it comes to international roaming and smart phones you have a choice, either disable your data usage, or be prepared for a huge bill when you get home. Prior to the trip I prepaid for a data plan, but on my return I still found that I had an excess data usage bill of $70. On a pay as you go style data plan this actually only equates to less than 5MB of data (cost is $15/MB). Half way through the trip I remembered that my Kindle DX has free internet access through their WhisperNet service so I tried to use this where possible. Now this may not be the best experience for web browsing, but for things like sending and receiving emails, I found it worked a treat. To access Google Mail on a mobile device, navigate http://m.gmail.com and you will get a very text based view of your emails cutting down on a lot of the extras that you just don’t need.
With the Kindle web browser, there are obvious limitations such as the fact that you only have a black and white screen, you don’t have a mouse so you have to use the 5-way controller and previous and next page to navigate around, but if you are prepared to live with these you’ll save yourself a fortune in roaming data charges.
Most of the Google apps are easily viewable on the Kindle Gmail. Navigate to http://m.google.com and you will be presented with a list of many of the Google apps including Gmail and Google Reader that you can access.
Other great sites that work well on the Kindle are Lonely Planet (http://m.lonelyplanet.com), Yahoo Mail (http://m.yahoo.com) , Facebook (http://touch.facebook.com) and Twitter (http://mobile.twitter.com). There is also a great service which collects some of the most popular links at http://kinstant.com. Be sure to check out the great lightweight Google maps app they have at http://kinstant.com/maps/.
Fortunately NZ use the same power points and voltage as in Australia, so I didn’t need to take a converter for my previous trip, but for my next trip I’ll need to take a power adapter. One trick I learned was make sure you not only take a power adapter, but also at least a double adapter. Not only will there be times when you need to connect more than one device, but also just in case any fellow travellers you are with forget theirs.
So what tips and tricks do you have for overseas business travel? Please add them to the comments below.
19 May 2011
In my previous article Telco’s Holding Us To Ransom I discussed my dissatisfaction at the way in which Windows Phone 7 updates are blocked by the Mobile Carriers. This doesn’t just affect the Windows Phone 7 platform, but also the iPhone and Android devices. It was interesting to read an article today discussing Microsoft’s strategy to break the hold that the mobile carriers have over them:
Microsoft has a good mobile OS, they just bought a soft carrier in Skype, and whether the rumors of a potential acquisition of Nokia pan out or not, Microsoft’s recent deal with Nokia seems to go beyond a simple OS licensing agreement. If Microsoft is trying to turn the cellular industry on end, it’ll start out with Nokia hardware built to Microsoft specifications…
And of course Microsoft isn’t alone in this ambition. Apple and Google each appear to have been moving to the same destination by different paths. Apple’s integration of FaceTime, first into the iPhone, then the iPod Touch, iPad 2, and Mac OS, is a clear move toward carrier independence.
Read the full article at Is Microsoft trying to end the reign of mobile carriers?
18 May 2011
You may recall from a previous post I talked about the Down Under Tax that Harvey Norman had applied to the Samsung Series 9 laptops, well today Lenovo has had to defend its aussie pricing of its new X1 laptop.
Over the weekend Harvey Norman had a 30% sale on all laptops, so it just goes to show the kind of mark-up they have on these to be able to simply chop nearly a third off the price tag. This brought the laptop within my budget, plus I’m heading overseas next week so I’ll be able to get the GST back. All up this brings the price down to $1570 – a much more reasonable price I think.