DEV Community

Cover image for Fast feedback loops in software developement: they matter!
Nicolas Trahan
Nicolas Trahan

Posted on

Fast feedback loops in software developement: they matter!

There’s been some drama as of late with regards to Microsoft’s decision to remove the hot reloading capability from .NET command line tools for the upcoming .NET 6 release.

For those who don’t know, .NET is a Microsoft-led open-source and cross-platform software framework that supports a variety of languages, most notably C#, and a variety of application types, such as web applications/services, command line tools, and desktop and mobile applications. The feature in question, .NET Hot Reload, allows developers to apply code changes to applications they’re debugging without having to restart them. It’s similar to React Fast Refresh or Hot reload in Flutter.

So what happened exactly? On October 20th, Microsoft announced that hot reloading would only be available through Visual Studio for Windows in the upcoming November 8th general availability release of .NET 6. This means that developers using command line tools to develop for .NET—those using Visual Studio Code on any platform, for instance—wouldn’t be able to benefit from hot reloading once they switched to the GA release. This announcement was especially surprising and frustrating since this feature had been available in preview for a while, seemed to be working decently well, and was pulled so close to the release date.

The backlash was strong and immediate: see the coverage by The Verge or by Dustin Moris Gorski, a .NET developer, for instance. Thankfully though, Microsoft listened to the .NET open-source community and soon reversed course, deciding to allow the feature to be included in the final release after all. (also see this article by The Verge for more details on the reversal)

Why were .NET devs so vocal and angry about Microsoft’s decision? Clearly, Microsoft handled the situation very poorly, but no doubt the frustration was amplified because of how powerful and important this feature is.

I can relate. In my current project at work, I’m working on an ASP.NET Core MVC application with an HTML/CSS/Javascript frontend, using Visual Studio on Windows as my IDE. With this setup, whenever I'm debugging the application and I edit any file that isn’t a view, the entire application needs to be stopped and restarted before I can see my changes in action. This takes a little while, but even then I'm still not done! Now I'm staring at the first page of my site and all the inputs are blank, so now I have to navigate back to where I was before and enter all my data back into the page again.

But the impact on my productivity goes beyond the time that's wasted getting back to the previous state in my application every time I make some code changes. It’s also the fact that the whole process is distracting and might take me out of my flow. By the time I'm finally back to where I was before, I have to ask myself, “What was I trying to do again?”. Sometimes I can’t remember! I need to get refocused, a huge waste of mental energy. Being able to simply save my source code and see the changes applied instantly would allow me to keep my focus and preserve my limited supply of mental energy, allowing me to be much more productive.

In general, hot reloading can be seen as a tool to speed up what some people call the “inner loop”, the “inner dev loop”, or the “launch/debug/update loop”, which is the process you go through repeatedly in development of making code changes and seeing/testing the resulting application. So what’s the moral of this story? Having a fast inner loop can greatly boost your productivity as a developer. Which by the way is something you might have realized if you've ever worked in a dynamic language like Javascript, PHP, Python or Ruby. And in my opinion, I'd actually say that their ability to provide fast inner loops have always been one of the main, if not the main selling points of dynamic languages. But I digress… happy coding and get that fast inner loop if you can!

Cover photo by Tine Ivanič on Unsplash

Top comments (0)