Richard's Blog

  • Bionic 3D printed hands at Leeds Sharp

    3D hand parts

    We had a great talk at Leeds Sharp this month. Would love to have seen this in person, but remote Leeds Sharp continues with more great talks.

    Clifford Agius showed us what you can acheive with a 3D printer by talking us through his long running project to make a better bionic hand for Hayden, the son of a close friend. As bionic hands are so expensive (currently around £45,000) and children grow out of the quickly, you can't get one from the NHS till you're fully grown. 3D printing and open source plans show a lot of exciting potential to make things better, cheaper and share them with …

  • Nogginbox is back

    This website has been down for a few weeks since my old web host lost my virtual machine in a RAID disaster. If my business depended on this website I would have spent more time and money on my backup strategy. And although this is not a business critical site, it is still one close to my heart and the pain and time taken to get this site back up has been more than I anticipated.

    This site was hosted on a cheap VM with UK Webhosting. I was not paying for the optional extra of backups. But I was regularly backing up the database and saving it on the server. I made the assumption (NEVER MAKE …

  • Installing a free SSL Cert on your IIS .NET Core MVC website

    SSL certs are getting more and more important on the web as we want to make sure that our websites are safe and trustworthy. I’ve put off installing them on my own personal web site projects because of the cost and the work involved in keeping them up to date.

    Let’s Encrypt is an open Certificate Authority that is trusted and issues free 3 month certificates. They have an API that lets you automate getting these certificates and there are several tools for Linux and Windows that use this API to save you the work of installing and keeping your certs up to date.

    I used the Windows tool Certify …

  • Forms Authentication in .NET Core (AKA Cookie Authentication)

    In .NET Core MVC you're encourages to use .NET Identity, but you don't have to. You can manage your own user identities and you use forms authentication which is now called Cookie Authentication (which is a better name really).

    You need to install the Microsoft.AspNetCore.Authentication.Cookies nuget package.

    There is some configuration that needs to go in startup.cs:

    public void ConfigureServices(IServiceCollection services)

    {

    services

    .AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)

    .AddCookie(options => {

    options.AccessDeniedPath = "/ …

  • Don't be afraid of RCSI

    Enabling SQL Server RCSI

    RCSI is not something you get from typing too much, it's a setting in MS SQL Server that is disabled by default. Arguably it shouldn't be. It stands for Read Committed Snapshot Isolation and when enabled means that you can select data from the database with less risk of locks and also know that the data you're getting was accurate when you started the request.

    I enabled it after we we started to see a lot of failed transactions in the logs due to timeouts on requests for locked resources. The thing that confused me was the locks were being taken out for transactions that were only doing …

  • Fun with glass

    Glass duck made at Zoë's Leeds glass studio

    I went to visit my friend Zoë at her stained glass studio in Leeds. Zoë designs and makes beautiful stained glass windows and has done installations in Leeds and all over Yorkshire.

    She was running a glass fusing workshop teaching you how to design and make a glass placemat. My design is of a duck (I'm a bit obsessed with ducks at the moment, but I'll probably get over it). I spent some time getting my design right on paper first before tracing that onto the glass. There are two layers of glass that get melted together in the kiln. There are lots of options of which layer of glass you draw …

  • My Windows Services Panel

    Screenshot of My Windows Services Panel

    As a developer I have a lot of different types of Windows Services installed on my computer for the different projects I work on. Services like MS SQL Server Express, MS SQL Server, IIS, MSMQ and MySQL.

    I don't use all of them all of the time, but I would normally leave them running because I couldn't be bothered trawling through all of the services in Services Manager to stop and start them. Having them running all the time made my computer take longer to startup and I felt like it was slowing it down generally and stealing battery power.

    So I created My Windows Services Panel as a way to …

  • NHibernate Search String Dictionary Bridge

    NHibernate Search is an extension to NHibernate that uses Lucene to give you full text search using Lucene under the hood. It also makes using Lucene in your .NET app easier than using Lucene.NET directly.

    Lucene only indexes text on a document in a flat key-value structure. Bridges are used to turn properties on your indexed documents into text.

    NHibernate Search comes with bridges for common types such as enum, but you can also write your own. This is an example of a bridge that turns a Dictionary property on your indexed objects into a set of properties on the lucene document. It only …

  • iOS Screenshot sizes when submitting your app

    When submitting your awesome app to the iOS App Store you need to provide screenshots for all the iPhone/iPod/iPad screen sizes. In itunes connect they're labeled by the inch size of the screen, but this doesn't help you know which simulator to fire up. So, here's a handy table of all the portrait screen sizes:

    3.5 inch (4s) 640×960

    4 inch (5, 5s) 640×1136

    4.7 inch (6) 750×1334

    5.5 inch (6+) 1242×2208

    It's also worth knowing that although you can update your app description after submitting the app, you can only update your screenshots with a full new app version. So make sure you get them …

  • Sharing Resource Dictionaries in your Xamarin.Forms App

    The Xamarin.Forms Application base class has a Resources property that you can use to share a resource dictionary across all pages of your app. If your app was created before Xamarin.Forms 1.4 you'll need to make sure you update and make your main App class inherit from the new Application class.

    If you like to do everything in code rather than XAML then you can create a ResourceDictionary in the constructor of you App class:

    public class App : Application

    {

    public App()

    {

    Resources = new ResourceDictionary();

    Resources.Add("ForegroundThemeColor",

    new Color( …