What .NET Developers ought to know to start in 2017
hanselman.com
hanselman.com
LINQ took C# from MS's Java clone with nicer generics to one of the best languages out there. It is phenomenal for increasing developer productivity.
Async/await, while a nifty, sometimes useful addition, is overhyped, code-complicating, unnecessary for most programmers, adds almost no performance benefits to most programs and infects the call stack above and below it with debugging problems, bad stack messages and extra code. It can introduce subtle and very nasty bugs, as well as impeding your ability to code some common patterns.
Why they keep pushing it as if every tom, dick and harry should write all their code using it, I do not know. It has a price so you should only use it when it's actually useful.
Async/await, just like query expressions, are a syntax construct - they are something that is difficult to discover. You don't find it in the auto complete list in the IDE (usually). This is why you need to learn about it to use it at all, let alone use it correctly, hence why it should be in the top things a modern C# dev needs to actually learn about - since the upsides for using it correctly are so great (code clarity), and the alternatives are so poor (chained tasks? managed threads? All comparable minefields that are difficult to grok). Plus, all the "call stack problems" you claim are inherent to any asynchronous tasks in C# - async/await actually gives your better traceability and debugging across asynchronous operations than any alternative.
So yeah, I'd say in terms of actual learning, knowing what/how/why for async/await is much more important than from/in/where/select (which you can forget using and just use the more discoverable library methods instead).
I've admittedly never had the 'millions of requests per second' clients, but the number of available threads has never been remotely the problem.
Back in 2006/2007 we had one app maxing out the IIS threads, but that was back when there were 100 threads max (as far as I can remember, might be wrong) and the actual underlying problem was slow SQL requests. Temp fix was to up the IIS threads, but once we fixed the SQL problem, no need for those extra IIS threads any more.
And even then, what will implementing async/await get you that you couldn't fix with a load balancer and web farm? Web farm is cheaper, easier and more effective. I think there's a Jeff Atwood piece somewhere on coding horror, or maybe a Joel one, to that exact effect. Cheaper to throw hardware at it then dev time. There's a certain scale that async/await actually fixes, the vast majority of C# web apps won't ever get close to it.
Every client I've taken on who were having performance problems were always fixed by monitoring SQL and fixing the bad queries. Or it was stupid loops calling moderately expensive SQL that did the same query over and over. Or something that could be easily cached. Or the same query being called several times in a stack where you could easily just pass the result down. One of those clients even had a previous dev who went async/await happy for extra 'performance' and it did zip. I ended up ripping most of it out, as I said, it infects code up and down the stack and complicates the code. All the 'optimized' async code was taking 1-2 milliseconds to run while the problem SQL was taking 5-10 seconds.
In a web app I can see the need if you're doing lots of external requests
I've seen far more issues with people not understanding how to use static and how it applies in a web application.
The reason is .NET Core doesn't ship with any cross platform desktop graphical class library unlike .NET Framework (ships with at least 3: Windows Forms, Windows Presentation Foundation and Universal Windows Platform).
I'm relatively new to .NET (though an experienced developer) and it took a couple of hours tops to research and write my first .NET CRUD app. It took even less time to begin writing useful cross-platform tools. That said, .NET Core still has some warts, and I look forward to it maturing throughout the year. From my perspective, it looks as if the development team moves pretty quickly.
I think this is great collection of resources to help onboard an engineer new to working with .NET and understanding the landscape.
It's not as if that couldn't be said about the other popular stacks as well.
I built one. And while it worked, it was never as readable or maintainable as if we had skipped Rx all together and written using other parallel paradigms.
But we kept on running into subtle issues because when we wrote the code we didn't fully grok scheduling/threading. It took us 3 months of spending 30%-50% of our time writing reactive extensions code to finally grok it, and we were highly motivated to learn. We eventually realized there was just no way the next developer who came on board could troubleshoot or debug it. So we ripped out all the reactive extension code and our app became a little less performant but a heck of lot more readable and maintainable.
I realize that the situation on Linux is very new for Microsoft but the current state after this much time is quite sad.
In the transition to msbuild projects they mixed-up the runtime versions. The documentation on using docker is wrong and very confusing - the Microsoft web site and the instructions on docker hub are not the same! The SDK image is broken, it seems to assume a Windows docker host - it tries to compile with the .Net Framework on Linux!
Publish a 5 line "hello world" program to a docker core runtime and you'll get a 250MB image. Try running more than a couple of those in a microservice configuration ... I hope you have deep pockets.
I can't say that I'm enthusiastic about the move to msbuild. After too many years of that on Windows I was hoping they would have seen the error of their ways.
I do think there's definitely an opportunity to streamline this, and separate the commit for the libraries from nuget, and the output from the build process... If they can automate this, all the better... I was pretty happy basing from the *-onbuild and it just built the project nicely and ran... but if you're constrained on space, I can definitely see this becoming wasteful very quickly.