Please, more Stephen Toub -- the deeper the better. Reminds me of the good old days watching Channel 9 in the early 2000s. It (at least looked like) a few guys walking around Microsoft with a video camera asking crazy smart people to explain incredibly difficult problems. It is fun to see smart people thinking hard whether I care about the particular technology or not.
I love these deep dives! Even though I'm already familiar with most of it, there's always a few hidden gems to learn. And I also just enjoy listening to Stephen Toub explain these things from the ground up.
I love the time limit they impose because with someone like ST, you know you're going to get right to the meat of the discussion without a lot of cruft. And revisiting something we use every day to explain it in low level detail really helps understand the WHY behind the implementation. GREAT stuff Scott/Stephen.
I really enjoy watching and learning from you guys. Pedagogical side of thing is just brilliant. It's so useful when Scott once in a while "takes the foot off the gas pedal" to explain "simple" things like underscore in an integer to separate thousands etc. It's so deep and explaining things from the first principles. Understand once and apply everywhere. It's like a breath of fresh air in an otherwise clean-code and clean-architecture flooded environment.
Cheer up guys who is looking this now rather being on Netflix. Thanks Scott. Stephan while reading your old blogs post for async and stuff wished to see you like this and it’s dream true. Please bring more stuff. This gives a great motivation as well. Thanks again.
I would love to see a part 2 with all of the potential optimizations. When you peek unther the covers to see how a library or .net itself implements things, it's really easy to get lost in the code, but a lot of the complexity comes from optimizations that have accumulated over time. It'd be great to be able to build a mental catalogue of "optimization patterns" so that we have an easier time reading code. I think this series will help immensely with this.
More of this, please. Scott and Stephen are great at these. Enjoyable, deeply satisfying and these peeks into the layer below my daily dev life are super interesting and are certainly having a valuable impact on my work. Just great stuff!
This kinda feels like the RU-vid version of the infamous C# in Depth (by Jon Skeet). Not to the extend where it will replace it (even if you get all the chapters), but in the sense that you get the same deep understanding of how the language works on a lower level. I really love it and hope to see more videos of this type.
I am loving these deep dives and the energy and enthusiasm between the two is fantastic. Not to mention the little things you drop in between like sealed classes, statemachine, profiler, benchmark, interlocked vs threadid kept me engaged. Keep throwing these videos, we are happy to catch. Awaiting for the next one..
I am not even .NET but a Java developer. Still this video was a motivation booster for me and I can't wait to see the next one with the specific Array optimized version. Thank you!
Holy crap just finding out about these deep dives, literally cannot wait to finish this and click on the async/await one sitting in the "up next" section of youtube lol
Thank you that was a great tutorial and very very insightful deep dive. Here we see linq is iterators all the way dow ;) Also thank you Scott for constantly telling Stephen to stop zooming out. Its very hard for us trying to follow the super fast drain dump going on and suddenly the code becomes completely unreadable due to Stephen zooming out all the time.
Would anyone else pay good money to see Stephen Toub do a dometrain-style course on performance profiling and optimization? Starting with how he thinks about performance optimization, talking about techniques and tools and then running through a robust example using everything he covered to optimize some piece of code... would be super cool if he did it for some open source project as a microsoft-sponsored demo using VS or any other stuff MS wants to showcase. Maybe a piece of OS code that MS uses internally but could never justify spending Stephens time on ;-) We need more Stephens. Would be good for the next generation of programmers to have a solid-starting point for this kind of work.
I love it that there are still people who are actual Computer Science nerds out there. At the end of the day, a lot of syntactic sugar boils down to `1: doSomething(); 2: if not done, GoTo 1;`
While this is very cool it's also worth remembering that LINQ to Objects (in-memory implementations like this) are just the tip of the iceberg. Expression trees and IQueryable is what sets LINQ and C# apart from similar in-memory techniques in JavaScript, Swift etc. They don't have a way to get the syntax tree and to allow the query to be translated to a completely different remote language like SQL.
Great video thank you very much. Bring some more goodies, please 🙂 but just remember about proper font size (thank you Scott 🙂 ). Maybe go even deeper with optimization, profiling, micro details. The check with current thread was really neat, I wonder what else Stephen keeps in his sleeves 🙂
The reason why the exception is thrown during the MoveNext call is the cursor, which keeps track of the items, is positioned right before the first item on the Enumerable. Similarly, the LINQ query is executed when it's used and not where it's defined.
I would absolutely love more Stephen Toub videos! Please get him a decent microphone though, I find the difference in audio quality between Scott and Stephen is distracting
If Stephen wasn't doing so much good work on everything he touches, I would say please make more videos! But I can't help worrying that every minute he spends explaining something to me, he's not making the language/framework more awesome. We need to clone this mans brain!
Surely Reset() is a member on IEnumerator because IEnumerator is C#'s version of the well documented (GoF) Iterator pattern, which is described as MoveNext(), GetCurrent(), and Reset()
Hi Stephen! Thanks for the nice session. I have one question though. What would have been the problem if we would have created '_enumerator' from inside 'Enumerator' constructor.
I have question, if we use Select or Where does it create a new copy of the original source or what and if yes does this mean that using linq may have performance issues ?
No copy of the source created, but LINQ uses deferred execution (lazy evalutation), so nothing will be enumerated until you use foreach or call ToList(), First() etc. LINQ has excellent performance, so don't be afraid to use it (except in very low-level scenarios).
44:08 Could have checked for null, initialize the Enumerator field to null, and then set it here only if it's null. Using int-based state variable doesn't look good.