ProgNet 2018

I’m currently attending ProgNet 2018 held at SkillsMatter in London. This is an annual conference that focuses on the latest trends and technologies in the .Net space. The conference runs over three days, and consists of a day of talks followed by two days of instructor-led workshops.

I’ve been several times before and it’s always a good event, with a variety of topics covered over the three days. I especially enjoy the conversations outside of the sessions during the breaks and in the evenings, and the chance to mix with some very knowledgeable people.

During the first day of the conference, I sketchnoted the talks that I attended. Videos for all of the talks are available on the ProgNet 2018 website.

Own The Future

by Udi Dahan Website Twitter Video

Own The Future by Udi Dahan

In this talk, Udi talked about the problems that companies tend to have when trying to maintain a piece of software over time. He highlighted the traps that are easy to fall into, including attempting to rewrite the software only to be left maintaining both the original big ball of mud and the rewrite side-by-side. He then suggested some techniques that can help, such as better initial requirements (including “why” something is wanted), giving better estimates, and working in a more iterative way. Ultimately his suggestion is to compose applications using the bounded context idea from Domain Driven Design to give better decoupling, keeping unrelated behaviours separate from each other, and preventing the big ball of mud from happening in the first place.

Let’s Talk HTTP In .Net Core

by Steve Gordon Website Twitter Video Slides

Let's Talk HTTP In .Net Core by Steve Gordon

Many modern applications make use of HTTP for communication for calls between microservices, to 3rd party REST APIs, or even to cloud services. HttpClient is widely used to make these calls, but can cause serious issues if not done properly.

Steve showed some example code for making a remote call using HttpClient, and highlighted the issues that can happen in the underlying TCP layer as a result of its use. He then adapted the code in several steps to show how to use the IHttpClientFactory (introduced in ASP.NET core 2.1) to do it properly, including integrating with DI containers and middleware.

He also introduced Polly, a library for introducing resilience and fault handling into an application. With Polly, it is easy to configure the behaviours that should happen when errors occur, including retries, trimeouts and fallback.

Steve finished off the talk by giving some general tips for working with HTTP calls.

Building Real Time Software With ASP.Net Core SignalR

by Rachel Appel Website Twitter Video Slides

Building Real Time Software With ASP.Net Core SignalR by Rachel Appel

This talk was a beginner’s introduction to SignalR, a technology that allows real-time asynchronous communication from a server to clients. SignalR has recently been rewritten to remove some of the problems of the previous versions, as well as adding some new features.

Rachel started by explaining how to add SignalR to a web application, including its core concept of hubs that allow the communication between clients and the server. She showed how to configure a hub and how to send messages via it, using both the C# and Javascript clients.

She concluded the talk by highlighting a couple of settings that need to be changed when deploying to Azure to allow SignalR to work properly.

Learning To Code By Making Games

by Willow Rendle Video

Learning To Code By Making Games by Willow Rendle

Starting with Scratch, then Hopscotch, and ending up at Unity, Willow (who is only 12 years old) described her journey in making games. Most of the talk revolved around Unity, its ecosystem, and the things that can be achieved with it.

Willow demonstrated some of the games she has made and the tools and techniques used to make them, including the many freely available models, textures, sounds and environments that can be downloaded from the Unit assert store. She then went on to demonstrate what is possible with Unity by showing off some of the freely available game kits (available for both 2D and 3D games) that are useful for learning from. These are full games that include the code and graphics that can be inspected to see how to achieve certain game effects and behaviours.

Security In Cloud Native

by Robin Minto Website Twitter Video

Security In Cloud Native by Robin Minto

Robin talked about the importance of security in modern software, especially in cloud based systems.

He started by giving an overview of cloud native applications and described the three major threats to them: vulnerable software, leaked credentials, and time. These threats can be mitigated using a security model developed by Pivotal called the 3Rs: Repair (fixing software, patching infrastructure, updating dependencies), Repave (destroy and recreate environments to destroy anything nasty that may have got inside), Rotate (change credentials, certificate, keys regularly).

Robin went on to talk about the different cloud providers (e.g. Microsoft Azure, Amazon AWS, Google Cloud), and how they will always be better than you at security - they employ more knowledgeable security people and have more visibility and exposure to the latest threats.

After introducing some of the security issues that are easy to do with cloud applications and how to mitigate them, Robin concluded by showing some tools to help to secure your cloud applications.

Turning Passion Into Experience

by Shawn Wildermuth Website Twitter Video

Turning Passion Into Experience by Shawn Wildermuth

Shawn spoke about the importance of having passion and excitement about what you do as a developer. It is not enough however to have just these attributes - you have to be willing to take risks alongside them. He talked about his own experiences of following technologies that even though short-lived, gave him the opportunity to learn new things. 

He gave examples from his own career of having imposter syndrome, and weighed it up against the arrogance that some developers use as camouflage to hide their insecurities. He also stressed the importance of saying “I don’t know” and that it is ok to do so, even as an experienced developer.

Shawn talked again about some of his failures, and highlighted how failures are useful because they are a learning opportunity and a moment of growth that you will be better for after experiencing. This has to be balanced against risk however, and you should understand what level of risk you are willing to take.

Career Advice For Programmers

by Tirsha Gee Website Twitter Video

Career Advice For Programmers by Trisha Gee

Trisha talked about how she now has the job she really wants (she is a developer advocate at Jetbrains and works remotely from Spain) after steering her career in that direction over a number of years.

She talked about the recruitment of developers and how the software industry is not very good at measuring programming ability, meaning that figuring out who to hire and reward is hard. As a result, being good at a job is not the same as looking good at a job. She then gave some tips on how to “hack the system” so that you can look like you are good at your job.

She concluded the talk by giving some advice on how to iterate on your career to move it forward.


DDD Reading 13

At the weekend, I went down to Reading to attend DDD 13. Hosted at Microsoft’s offices the DDD Reading event is the mother of all of the DDD events, with the first one held back in 2005.

Here are the sketchnotes I took of the talks I attended.

Quantum Computing: Don’t Panic

by Anita Ramanan Twitter and Frances Tibble Twitter

Quantum Computing: Don't Panic by Anita Ramanan and Frances Tibble

Web Assembly, Blazor, And The Future Of Web Development

by Joseph Woodward Website Twitter

Web Assembly, Blazor, And The Future Of Web Development by Joseph Woodward

From Monolithic Monster To Majestic Microservice App

by Callum Whyte Website Twitter Slides

From Monolithic Monster To Majestic Microservice App by Callum Whyte

Automate Your Test Infrastructure With Kubernetes

by Joe Stead Website Twitter

Automate Your Test Infrastructure With Kubernetes by Joe Stead


DDD South West 8

I attended DDD South West at the weekend in Bristol. As usual, it was a great event.

Here are the sketchnotes I took of the talks I attended.

Outside-In TDD

by Ian Russell Website Twitter

Outside-In TDD by Ian Russell

Give It A REST - Tips For Designing And Consuming Public APIs

by Liam Westley Website Twitter

Give It A REST - Tips For Designing And Consuming Public APIs by Liam Westley

Kubernetes For .Net Developers

by Shahid Iqbal Website Twitter Slides

Kubernetes For .Net Developers by Shahid Iqbal

Teaching An Old Dog New Tricks

by Ismail Mayat Website Twitter

Teaching An Old Dog New Tricks by Ismail Mayat

Patterns And Practices For Building A Better Web API Architecture

by Joseph Woodward Website Twitter

Patterns And Practices For Building A Better Web API Architecture by Joseph Woodward


Cambridge Alexa Devs Meetup

I recently attended the inaugural meetup of the Cambridge Alexa Developers Group held at Amazon’s Cambridge office. The group was set up by Bob Harris and Rich Merrett, who both gave talks on building Alexa skills and SSML.

David Low, Amazon’s Head of Solutions Architects, also gave a talk about how to best create a skill by working out its user value:

Working Backwards by David Low

One particlarly interesting thing covered was a formula for working out whether a skill will be a “killer skill”:

Cusomter value × Contexts × Frequency × Multipliers
Complexity × Friction

The higher the output of this formula, the higher the likelihood that a skill will be succesful.

While this talk wasn’t recorded, he has given a similar talk before that was.


NDC London 2018

Last week I attended NDC London. It’s not the first time that I’ve been, but it is the first time I’ve done the workshops that run alongside the main conference.

I attended the “Identity & Access Control for modern Applications and APIs using ASP.NET Core 2” workshop hosted by Dominick Baier and Brock Allen. This was a two day workshop consisting of a mixture of presentation, discussion, and hands-on labs. It dived deep into the security aspects of modern ASP.Net applications, specifically the application itself and its APIs. The first day focused on how external authentication (via OAuth 2.0 and OpenID Connect) could be used to save having to implement authentication yourself in your application. The second day took this further and focused on how to secure an API that you may have in an application so that you can call it server-to-server, from mobile applications, or from JavaScript applications.

The remaining three days of the conference was in the form of talks. Like I’ve done before, I sketchnoted many of the sessions that I attended.

What Is Programming Anyway?

by Felienne Hermans Website Twitter Video

What Is Programming Anyway? by Felienne Hermans

The Power Of Technical Decisions

by Jake Ginnivan Website Twitter Video

The Power Of Technical Decisions by Jake Ginnivan

You Build It, You Run It

by Chris O’Dell Website Twitter Video

You Build It, You Run It by Chris O'Dell

An Introduction To Kotlin

by Dmitry Kandalov Website Twitter Slides Video

An Introduction To Kotlin by Dmitry Kandalov

Composite UIs: The Microservices Last Mile

by Jimmy Bogard Website Twitter Slides Video

Composite UIs: The Microservices Last Mile by Jimmy Bogard

Designing For Speech

by Jessice Engström Website Twitter Video

Designing For Speech by Jessica Engström

Jewelbots: How To Get More Girls Coding

by Jennifer Wadella Website Twitter Slides Video

Jewelbots: How To Get More Girls Coding by Jennifer Wadella

Who Needs Dashboards?

by Jessica White Website Twitter Slides Video

Who Needs Dashboards? by Jessica White

Pilot Decision Management

by Clifford Agius Twitter Video

Pilot Decision Management by Clifford Agius

A Developer’s Guide To Machine Learning

by Tess Ferrandez-Norlander Website Twitter Slides Video

A Developer's Guide To Machine Learning by Tess Ferrandez

CSP XXP STS PKP CAA ETC…

by Scott Helme Website Twitter Video

CSP XXP STS PKP CAA ETC... by Scott Hulme

Web Apps Can’t Do That, Can They?

by Steve Sanderson Website Twitter Video

Web Apps Can't Do That, Can They? by Steve Sanderson

These are the other talks I attended but didn’t sketchnote:

C# 7.0

by Jon Skeet Website Twitter Video

C# 7.1 and 7.2: The Releases You Didn’t Know You Had

by Bill Wagner Website Twitter Video

The Psychology Of Social Engineering

by Niall Merrigan Website Twitter Video

The Modern Cloud

by Scott Guthrie Website Twitter Video

The Hello World Show Live

hosted by Heather Downing and Spencer Schneidenbach Website Video

Tips And Tricks With Azure

by Scott Guthrie Website Twitter Video

Why I’m Not Leaving .Net

by Mark Rendle Website Twitter Video


DDD North 2017

I recently attended DDD North 2017 in Bradford. I’ve been wanting to take up sketchnoting for a while now, but have never gotten round to doing it, so when Ian Johnson (go check out his sketchnotes - they are great) prompted me to take my sketchbook and pens with me, I reluctantly obliged. I’m so glad I did though as I really enjoyed doing them, and I feel it had the effect of me being able to recall much more of the content of each talk. I tweeted the sketchnotes after each session and got a great response from both the speakers and attendees.

Here are the sketchnotes I did during the day.

Microservices: What I’ve Learned After A Year Of Building A System

by Nathan Gloyn Website Twitter Slides

Microservices: What I've Learned After A Year Of Building A System by Nathan Gloyn

Spot The Difference: Automating Visual Regression Testing

by Viv Richards Website Twitter Slides

Spot The Difference: Automating Visual Regression Testing by Viv Richards

Married To The Mob (Programming)

by Derek Graham Website Twitter Slides

Married To The Mob (Programming) by Derek Graham

How To Parse A File

by Matt Ellis Website Twitter Slides

How To Parse A File by Matt Ellis

Alexa, Open Sneezaroo…

by Zinat Wali Twitter

Alexa, Open Sneezaroo... by Zinat Wali


Setting a culture for all threads in an application

If you do any kind of globalisation in your applications, you will probably already be familiar with the Thread.CurrentCulture and Thread.CurrentUICulture properties that can be used to set a culture on the thread so that .Net knows to load the correct resources and to format numbers and dates properly.

A big downside to using approach this is that the culture is only set on the current thread, meaning that any new threads created will be using the default culture for the application (which is tied to the regional settings of the operation system). This wasn’t too much of a problem years ago when multi-threading was not used widely, but in modern application development it is virtually impossible to avoid using multiple threads (e.g. Task Parallel Library), especially when trying to make use of modern multi-core hardware. You would have to manually set the culture when spawning new threads to ensure that the correct culture was being used - a real pain and a common cause of bugs.

.Net 4.5 comes to the rescue with the introduction of two new properties:

CultureInfo.DefaultThreadCurrentCulture
CultureInfo.DefaultThreadCurrentUICulture

A culture can be set using properties that will then be used for all threads in the whole application domain, meaning that you can set the correct culture at application start up and all threads will use that culture. By default, these properties are set to null meaning that the pre-4.5 behaviour will still hold and that the system culture will be used by default.

The MSDN docs for CultureInfo.DefaultThreadCurrentCulture and CultureInfo.DefaultThreadCurrentUICulture provide more details.


Alternatives to .Net Reflector

RedGate recently announced that from the next version of Reflector (v7), they will charge $35 for a licence. Since the announcement a few weeks ago, there has been quite a backlash against the decision from the .Net community, mainly because RedGate have put a time-bomb in the currently-free version so that it will expire at the end of May 2011. In response to this announcement, several alternatives to Reflector have surfaced - some free, some commercial. The list below outlines all of the alternatives, some of which have been around for many years.

  • JetBrains ReSharper (commercial + free)
    Within a day of the announcement, JetBrains put out a teaser suggesting that a decompiler was in the works. Two weeks later, they announced that the next version of ReSharper will have an integrated decompiler akin to reflector, along with a free standalone version to be released later in the year.

  • Telerik JustCode (commercial)
    Just as JetBrains put out a teaser, Telerik followed suit and showed a decompilation feature that will be in the next version of their JustCode tool.

  • ldasm (free)
    This tool comes bundled with the Windows SDK Tools (that get installed as part of Visual Studio). It is purely an IL disassembler, and so cannot decompile to C#.

  • ILSpy (free)
    The team behind SharpDevelop have been working hard on ILSpy and have already released a major milestone of v1 of their decompiler. It can decompile to C#.

  • Cecil Studio (free)
    This is a Windows forms UI based on the Mono Cecil library. It has already been around for a few years.

  • MonoReflector (free)
    This is a WPF UI based on the Mono Cecil library.

  • MonoDevelop Assembly Browser (free)
    Released for the first time in version 2.0 of MonoDevelop (currently at v2.4.2).

  • Salamander .Net Decompiler (commercial)
    This is part of a larger tool called .Net Explorer.

  • Dis# (commercial)
    This tool has been around for a while, but is not often mentioned. It is not as polished as Reflector and does not support never versions of .Net, but has some nice features not seen anywhere else. Once such feature is to rename the decompiled variables within the tool to give them a more meaningful name.

  • Spices .Net Decompiler (commercial)
    As well as decompiling to IL, C#, J#, C++ and Delphi.Net, this tool has a feature to build code flow diagrams from the decompiled source to show the execution flow.

  • Decompiler.NET (commercial)
    This is s decompiler combined with an obfuscator, language translator and refactoring tool that integrates with Visual Studio.

  • Keep Decompiling Free
    This website popped up recently with nothing more than a teaser to get more information when it is available.

  • RedGate Reflector (commercial)
    Of course, there is still the current king of them all, albeit in a now charged-for format. Still well worth the $35.

Which of these will turn out to be the best/most successful to take Reflector’s throne is yet to play out, but there seems to be a healthy interest from both the community and commercial aspects in making a replacement.


Temporarily disabling ReSharper

I have ReSharper installed and think it is a great tool for productivity, but occasionally I find it useful to temporarily disable it to speed up Visual Studio (especially so on my old, slow laptop). This is achieved in two different ways, depending on the version of ReSharper.

In versions prior to version 5, ReSharper appears in the Add-in Manager dialog, accessed via the Tools menu. Using this dialog, you can uncheck the ReSharper add-in which will suspend it (the menu will still be visible, but its functionality will be disabled).

Add-in manager

Checking it again will re-enable it. Both of these actions can be performed without restarting Visual Studio.

In version 5, ReSharper no longer appears in the add-ins dialog. At first glance, I though the ability to disable ReSharper was no longer available. As it turns out, it is now part of ReSharper itself and is accessed via the Tools -> Options -> ReSharper -> General dialog. Clicking the suspend button will suspend ReSharper and disable its functionality. Once suspended, clicking the resume button will re-enable it.

ReSharper options

This applies to all versions of Visual Studio - the difference is based on the version of ReSharper only.