Menu Sidebar

Alex Hardwicke

I'm the author of this blog. I'm a dad, husband and programmer, in roughly that order. Read more about me here.


Open Sourcing Surge

I’m finally biting the bullet and open sourcing Surge – the source is now available on GitHub. I’ve been thinking about open sourcing it for years, but I’ve always been hesitant – it’s the first project I’ve stuck with for more than a few months, and I’ve learnt an incredible amount since starting it – […]

Moving Surge.Core from C# to F#

As I’ve mentioned before, learning F# has been one of my goals for a while. During Christmas (2014), I decided to use the free time to start on this, and it’s gone very well. I went through various tutorials and books, and then went in the deep end and rewrote the entire back-end of Surge […]

Windows 8.1 Universal Apps (Part 4: XAML)

XAML As mentioned in the previous post in this series, by default App.xaml will be in the Shared folder, but you’ll have a unique MainPage.xaml for Windows and Windows Phone. You may have wondered that, as you can clearly share App.xaml between projects, if you can share other XAML. The answer is yes: you can […]

Windows 8.1 Universal Apps (Part 2: Not Perfect)

Minor Problems I said earlier that code can be shared between Universal Apps. This is true, but there are a few exceptions. For the most part, you can think of WinPRT as a subset of WinRT. There are several methods that WinRT has that will throw a NotImplementedException if you call them from WinPRT. Mostly, […]

Windows 8.1 Universal Apps (Part 1: The Basics)

What are Universal Apps for Windows 8.1? Universal Apps are Microsoft’s current solution to the problem of multiple devices. When you create a Universal App, you have one solution that will run on both Windows 8.1 and Windows Phone 8.1 devices. This works because Windows Phone 8.1’s runtime (WinPRT) is, generally speaking, completely compatible with […]

Pattern Matching

Pattern matching is pretty great. Essentially, it lets us match stuff. The verbose (although not very) syntax is: Or, we can do this: If you hadn’t figured it out, _ is the wildcard. If you don’t have a wildcard and don’t get a match, you’ll have a MatchFailureException thrown. We can also pattern match our […]

Little Watson

Dr Watson (the debugger included with Windows, not Sherlock Holmes’ Boswell) is obviously the inspiration of this name. I’m not sure where the term first originated, but for those not in the know, a Little Watson is a very simple bug reporter. The flow is simple: catch all uncaught exceptions, save them to disk and […]

WinRT Flyout Performance

I’ve been having problems with the files flyout in Surge for some time. The performance was pretty terrible: for normal torrents with at most hundreds of files, performance was almost acceptable on my desktop but terrible on my Surface RT. However, with torrents with thousands of files, even my desktop took more than thirty seconds […]

Units of Measure in F#

So, F# has units of measure built in. They’re pretty cool. Essentially, you can declare units of measure, like this: Once you’ve done that, you can then associate these units of measure with numeric types. You can combine measures, either with new values, or by multiplying or dividing already existing identifiers with units. Finally, you […]

Older Posts

Alex Hardwicke

A programming blog, focused on Xamarin & F#.