Category Archives: Conference

NDC London 2018

As usual with my posts, the target audience is ultimately me. In this case, I’m documenting the talks that I’ve seen so that I can remember to come back and look at some of the technology in more depth. I spent the first two days at a workshop, building a web app in Asp.Net Core 2.0…

Asp.Net Core 2.0 Workshop

These were two intense days with David Fowler and Damien Edwards where we created a conference app (suspiciously similar to the NDC app) from the ground up.

Notable things that were introduced were HTML helper tags, the authentication and authorisation features of .Net Core 2.0. The ability to quickly get this running in Azure.

Day One

Keynote – What is Programming Anyway? – Felienne Hermans

This was mainly relating to learning, and how we learn and teach, how we treat each other as developers, and the nature of programming in general. Oddly, these themes came up again several times during the conference, so it clearly either struck a chord, or it’s something that’s on everyone’s mind at this time.

Sondheim, Seurat and Software: finding art in code – Jon Skeet

Okay, so let’s start with: this is definitely not the kind of talk I would normally go to; however, it was Jon Skeet, so I suppose I thought he’d just talk about C# for an hour and this was just a clever title. There was C# in there – and NodaTime, but not much. It was mainly a talk about the nature of programming. It had the same sort of vibe as the keynote – what is programming, what is good programming (or more accurately, elegant programming). At points throughout the talk, Jon suddenly burst into song; so all in all, one of the more surreal talks I’ve seen.

Authorization is hard! Implementing Authorization in Web Applications and APIs – Brock Allen & Dominick Baier

This was sort of part two of a talk on identity server. They discussed a new open source project that Microsoft have released that allows you to control authorisation; so, you can configure a policy, and within that policy you can have roles and features. What this means (as far as I could tell – and I need to have a play) is that out of the box, you can state that only people with a specific role are able to access, say an API function; or, only people that have roles with a specific feature are able to access an API function.

The example given was using a medical environment: a nurse, a doctor and a patient; whilst they all live in the same system, only the nurse and doctor are able to prescribe medication, and it is then possibly to configure the policy such that the nurse is able to prescribe less.

I’m Pwned. You’re Pwned. We’re All Pwned – Troy Hunt

This was the first of two talks I saw by Troy. This one was on security; although, oddly, the second was not. He did what he normally does which was start tapping around the internet, and showing just how susceptible everyone was to an attack.

He also mentioned that the passwords that he keeps in his database are available to be queried. I believe there’s an API endpoint, too. So the suggestion was that instead of the usual: “Your password much be 30 paragraphs long with a dollar sign, a hash and a semi-colon, and you have to change it every five minutes,” restriction on password entry, it would be better to simply ensure that the password doesn’t exist on that database.

Compositional Uis – the Microservices Last Mile – Jimmy Bogard

The basic premise here is that, whilst many places have a partitioned and Microservice architected back end, most front ends are still just one single application, effectively gluing together all the services. His argument followed that the thing to then do was to think about ways that you could split the font end up. The examples he gave included Amazon, so this isn’t a problem that most people will realistically have to solve; but it’s certainly interesting; especially his suggestion that you could shape the model by introducing a kind of message bus architecture in the front end: so each separate part of the system is polled and in turn “asked” if it had anything to add to the current request; that part of the system would then be responsible for communicating with its service.

C# 7, 7.1 and 7.2 – Jon Skeet and Bill Wagner

This was actually two talks, but they kind of ended up as one, single, two hour talk on all the new C# features. I have previously written about some of the new features of C#7 +. However, there were a few bits that I either overlooked, or just missed: pattern matching being one that I overlooked. The concept of deconstruction was also mentioned: I need to research this more.

Day Two

Building a Raspberry Pi Kubernetes Cluster and running .Net Core – Scott Hanselman & Alex Ellis

This was a fascinating talk where Alex had effectively build a mini-cloud set-up using a Raspberry Pi tower (IIRC six), and using a piece of open source software called Open Faas to orchestrate them.

This is a particularly exciting area of growth in technology: the fact that you can buy a fully functional machine for around £20 – £30 and then chain them together to provide redundancy. The demonstration given was a series of flashing lights; they demonstrated pulling a cable out of one, and the software spotted this and moved the process across to another device.

An Opinionated Approach to Asp.Net Core – Scott Allen

In this talk, Scott presented a series of suggestions for code layout and architecture. There was a lot of ideas; obviously, these all work well for Scott, and there was a lot of stuff in there that made sense; for example, he suggested mirroring the file layout that MS have used in their open source projects.

How to win with Automation and Influence People – Gwen Diagram

Gwen gave a talk about the story of her time at Sky, and how she dealt with various challenges that arose from dealing with disparate technologies and personality traits within her testing team. She frequently referred back to the Dale Carnegie book “How to win friends and influence people” – which presumably inspired the talk.

Hack Your Career – Troy Hunt

It’s strange listening to Troy talk about something that isn’t security related. He basically gave a rundown of how he ended up in the position that he’s in, and the challenges that lie therein.

HTTP: History & Performance – Ana Balica

This was basically a review of the HTTP standards from the early days of the modern internet, to now. Scott Hanselman touched on a similar theme later on, which was that it helps to understand where technology has come from in order to understand why it is like it is.

GitHub Beyond your Browser – Phil Haack

Phil demonstrated some new features of the GitHub client (which is written in Electron). He also demonstrated a new feature of GitHub that allows you to work with a third party on the same code (a little like the feature that VS have introduced recently).

.Net Rocks Live with Jon Skeet and Bill Wagner – Carl Franklin & Richard Cambpell

I suppose if you’re reading this and you don’t know what .Net Rocks is then you should probably stop – or go and listen to an episode and then come back. The interview was based around C#, and the new features. You should look out for the episode and listen to it!

Keynote – The Modern Cloud – Scott Guthrie

Obviously, if you ask Scott to talk about the cloud, he’s going to focus on a specific vendor. I’ll leave this, and come back to it in Scott’s later talk on a similar subject.

Web Apps can’t really do *that* can they? – Steve Sanderson

Steve covered some new areas of web technology here; specifically: Service Workers, Web Assembly, Credential Management and Payment Requests.

The highlight of this talk was when he demonstrated the use of Blazor which basically allows you to write C# and run it in place of Javascript.

The Hello World Show Live with Scott Hanselman, Troy Hunt, Felienne and Jon Skeet

I’d never heard of The Hello World Show before. To make matters worse, it is not the only You Tube program called this. Now I’ve heard of it, I’ll definitely be watching some of the back catalogue.

I think the highlight of the show was Scott’s talk – which pretty much had me in stitches.

Tips & Tricks with Azure – Scott Guthrie

This is the talk that I referred to above. Scott described a series of useful features of Azure that many people weren’t aware of. For example, the Azure Advisor, which gives tailored recommendations for things like security settings, cost management, etc.

Other tips included the Security Centre, Hybrid Use Rights (reduced cost for a VM is you own the Windows license) and Cost Management.

Serverless – the brief past, the bewildering present, and the beautiful (?) future – Mike Roberts

Mike has worked with AWS for a while now, and imparted some of the experience that he had, gave a little history of how it all started, and talked about where it might be going.

Why I’m Not Leaving .Net – Mark Rendle

Mark introduced a series of tools and tricks in response to every reason he could think of that people gave for leaving .Net.

Amongst the useful information that he gave was a sort of ORM tool he’d written called Beeline. Basically, if all you’re doing with your ORM tool is reading from the DB and then serialising it to JSON, then this does that for you, but without populating a series of .Net classes first.

He also talked about CoreRT which allows you to compile .Net. There’s a long way to go with it, but the idea is that you can produce an executable that will run with no runtime libraries.

DDD North 2017

DDD North is held every year at around this time. This year, it was on 14th October at Bradford University. In terms of the sessions that I saw, I think it’s probably amongst the best that I’ve attended!

This is a rundown of the sessions and anything I thought I might need to look into further (which, to be fair, is most of it!)

Session 1 – Nathan Gloyn – Microservices

Nathan started this talk by saying that, if you worked in the world of Microservices, you wouldn’t learn anything. This quickly became blatantly untrue (at least for me).

Amongst the talk, he mentioned the need for an external config management system, such as ZooKeeper. The reason being that, should you try to keep the config in a web.config type file (and use transforms to … transform them), you risk having to redeploy an entire system for a configuration update.

That you should log in a system that is running in a server that you have no direct access to is obvious, but he suggested keeping correlation Ids on the messages, so that the logs can trace a message as it travels through the system.

Regarding data updates, the suggestion was to keep the data updates separate from the app updates; and he came up with the intriguing idea of versioning the messages, so that the system can effectively self-update; for example, a message arrives in a subsystem saying it’s a version 1 message; the system realises that the latest version is 2, and so the update script is run then. This allows the system to gradually update itself.

Session 2 – David Whitney – Metaprogramming

This was a bit of a strange talk – as it started off, I couldn’t really work out what to make of it, as it seemed to be a “Have you heard about this thing called reflection?” But as the talk progressed, especially when the creation of a unit test framework was demonstrated in around 20 lines of code, the talk suddenly became very interesting.

One very interesting technique was that you could use reflection to register a set of default implementations for interfaces. Obviously, whether this would work in a particular project depends on why you’re using an interface in the first place, but in most cases, you’ll just want to be able to mock out your interface for a unit test, so you’ll have a one-to-one relationship between interface and implementation.

The other point of note was a mention of a method that allowed you to reflexively create a type without calling a constructor. I noted this down as CreateUnallocatedType, but for the life of me, I can’t find a reference to it anywhere. Please add to the comments or tweet me if you know what this is actually called.

Session 3 – Stephen Haunts – Scaling Agile

I hadn’t realised this until the talk started, but Stephen Haunts was unwittingly the person that got me interested in message queuing (through his Pluralsight course). The talk was effectively a review of how Spotify has scaled an agile team.

Amongst the overview of the specific scrum terms, I was pleased to see that Stephen referred back to the agile manifesto which, IMHO, is something that is frequently forgotten about (or in some cases not even known about) in some companies that claim to implement scrum.

One interesting concept was that of a feature train: the idea being that you work on your feature and, when it’s ready, it gets shipped in the next release. Stephen introduced us to a tool called Launch Darkly – which is a paid for product that allows feature switching.

Other established methods for scaling scrum teams that he mentioned were Scrum Nexus and Scaled Agile.

Session 4 – Stuart Lang – Async

This was probably my favourite talk of the day although, after dinner is possible the worse spot to have, as everyone is ready for a little nap. However, Stuart kept the subject alive and interesting.

The main focus of the talk was the SynchronisationContext – specifically focusing on deadlocks. The principle being that, while the base implementation of the SynchronisationContext (as used in a console app or a unit test) allows multiple delegates to be executed at any one time, all of the derivitives (WinForms, WPF and ASP.NET) do not. This means that, as much as it might be tempting to try these things out in a console app, or try to cover them with Unit Tests, the behaviour will change as soon as you drop it into your app.

Any app using .Result(), .GetAwaiter.GetResult(), .Wait() will be susceptible to deadlocks.

There were some workarounds that he mentioned; they were:
– SetSynchronisationContext(null)
– .ConfigureAwait(false)
– Task.Run()

They all clear the synchronisation context, preventing a deadlock.

There is an Async analyser in Rosyln called Async006.

There is an open source impementation of a Context Free Task. It can be installed from NuGet, but at the time of writing, is still in a very early release.

The star of the show here is Microsoft.VisualStudio.Threading. It provides access to a JoinableTaskFactory, which implements the behaviour that you would expect if you did call something like .Result(). That is, it executes the asynchronous code, synchronously. This means, not only do you not block yourself, but you don’t spin up a load of pointless threads in the process.

Finally, ASP.Net Core does not have this problem, because of the way that it implements the SynchronisationContext.

Session 5 – Zinat Wali – Alexa

The last session was a talk on Alexa, and how you might write a routine that will report, and then predict the pollen count. The data training model demonstrated would be familiar to people that have seen Azure’s version of the same thing.