I have written a lot about the conversion of DasBlog Web Forms to ASP.NET Core code, check out some of those posts here:
However, it was not until I started integrating features that would add or delete a blog posts that I realized how much the threading paradigm had changed. In fact I am realizing now that I took for granted the degree to which ASP.NET (as in System.Web) protected me from myself. Let me explain.
At work I spend a great deal of time reviewing hang dumps for a variety of our web platforms, I am usually trying to figure out exactly how this app got into a one in a million state that has slowed the app, caused a CPU spike or excessive memory consumption. Now that I am working on DasBlog Core in my spare time I have been forced to look at a couple of really bizarre scenarios related to ASP.NET Core architecture. I will blog about those scenarios soon but for now I just wanted to take a quick look at the difference between ASP.NET (System.Web) vs ASP.NET Core when it comes to hang dumps.
I have noticed that there are two ways that I tend to engage with new programming problems and paradigms. The first is a controlled and stable descent into a new idea, this method is usually guided by a class or book and tends to reveal new ideas sequentially and in an a particular order. It progressively exposes the concepts so that it naturally builds on information your receive in prior lessons.
That is the ideal, that is right way.
I had this interesting case I was triaging last week where a consumer of our API was complaining that we were changing the value of numbers in request body when it had a leading zero. For example, instead of 052 becoming simply 52.0 it would transform to 42. Similarly 0100 would not output as a decimal of 100, it would become 64.
When a colleague of mine tested it he got the exact same results in our own carefully curated environments. So this was officially very strange!
I mentioned a couple of weeks back how I am using Visual Studio to manage my local feature branches, however, I did not quite complete the picture. I merged my latest pull request with the master but I had an outstanding feature branch missing all the latest updates on the new master. The commit history of my older feature branch will be rewritten so that it starts from the most recent commit in the target branch of the rebase. Here is great illustration of what happens:
I was happily and randomly tweeting yesterday (as you do) and it occurred to me that I take null for granted. More importantly I am not sure that I understand what the C# languages would look without the idea of a null reference.
Charles Antony Richard Hoare a brilliant British computer scientist apologized for inventing the null reference
“I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.”
I had a really productive discussion with my extended development teammates last week, I was able to give a high level overview of the work I am doing with dasBlog in my spare time. It was a lot of fun, and my teammates had genuine interest in the work but a couple of colleagues expressed concern about the gap presented by GitHub.
In the past when our dev teams moved between code repositories (VSS to CVS to SVN to TFS) there was a gradual shift in branching methodology, however, Git seemed to immediately transform the nomenclature and the ideas behind it. I am slowly acclimating myself to Git and so I wanted to share how a developer with a long history with Visual Studio developer can get quickly get involved with projects hosted on GitHub.