Windows to Linux transition

I sat with my kids while they watched Justin Time (they love it) on New Years day and I started to clear up the disk in my Dell XPS 13. Its a 256GB SSD and while its not tiny it does need a certain about of housekeeping to keep on top of it.

After Dropbox and its bulging photo collection and the Windows 8.1 installation, the biggest bloat was coming from Visual Studio and Office. I also have a couple of Linux Virtual machines and a SharePoint VHD which I boot into to do SharePoint 2013 development.

I had already decided to learn some new languages this year, specifically Clojure and Ruby and also to work on my Python skills. So with this in mind and the frustration of a bloated disk I resolved to make some sweeping changes. Clojure and Ruby setup on Windows is doable, but by all accounts its not comfortable and not my fun so I decided to make the Linux install more permanent on my laptop.

I have a Shuttle box sitting under my desk which I use with ESXi for virtual machine. I’m not really running nay VMs at the moment on there so for now, I’ve stuck an SSD in there with SharePoint 2013 and Visual Studio 2013 on to do my SharePoint work - thats the SharePoint VM sorted out.

Refresh Linux mounts after changes made to /etc/fstab

When an update has been made to /etc/fstab the changes won’t immediately and automatically take effect so there is a need to refresh them manually.

This can be done either by rebooting, which is a pain or just use the mount command

mount -a

WPF Commands and Events with MVVM

I have been doing some revision on my WPF, particularly around ModelView-View-Model pattern. One thing that I’ve always found a bit difficult to get right is the handling of events on the window and getting them back to the view model.

I personally believe that the goal of a completely empty code behind should be a best efforts approach rather than mandatory, sometime there is a need for purely UI related code and this, in my view is the correct place.

I wanted to trigger a command when a key was pressed in a TextBox on my Window, in the past I’ve used the PreviewKeyDown and had a handler in the code-behind which has invoked the command on the ViewModel; this has never seemed correct or particularly satisfying. In my current play project I decided to find a better way to achieve this and I think I have - InputBindings.

On my ViewModel I have a DelegateCommand called AddTicker which I pass delegates for the Execute and CanExecute,

public ICommand AddTicker {get; private set;}

to bind to this from a button is easy, and now the same can be said for a Key press using the following XAML;

<KeyBinding Key="Return" Command="{Binding AddTicker}"></KeyBinding>

As an aside, it took me a while to remember how to get the CanExecuteChanged to fire without some ugly callback mechanism, I knew it involved a registration and it eventually came to me;

CommandManager.RequerySuggested += (s, e) => RaiseCanExecuteChanged();

public void RaiseCanExecuteChanged()
if (CanExecuteChanged != null)
CanExecuteChanged(this, EventArgs.Empty);

Focus on content on page load

One of the requirements for a piece of SharePoint/Office 365 work I’m working on at the moment is for easy finger usage when accessing with an iPad. The user base coming in on iPad are performing a specific task so a lot of the navigation and quick launch is not really applicable to them.

I have been looking at the best way to achieve this and found that calling the existing Javascript function is going to do fine for this need.

\$(document).ready(function () {
SetFullScreenMode(true); // or false to close full-screen

There was another option to set the css when the page loaded but this approach is cleaner

SharePoint and Office 365

Since starting to use Azure more and more I’ve found myself revisiting suddenly enthused by the web and cloud. I’ve had the obligatory Amazon free tier but done little with it. (I’ve recently talked with Amazon about a project at work where I learned quite a lot about glacier and spot instance pricing and it sounds great - I’ll write a post about that shortly).

I’m working on a project doing some initial SharePoint customisation for a customer with an Office 365 account for the company. It’s been a little while since I did SharePoint and I have needed to refresh myself on what is available out of the box, what the development model is like for 365 and how to actually deploy… I’m at early stages but I’m very impressed.

I have always been a fan of SharePoint, often defending its virtues to collegues who generally don’t understand what it’s capable of…. I’m looking forward to learning more about it in the coming weeks.