The conversation

Lessons learnedExperience excerpt · English

Eventually, I moved to other platforms and programming languages and had an epiphany that to …

… Eventually, I moved to other platforms and programming languages and had an epiphany that to function as a programmer of Windows software, I needed to know a lot of details about the platform. The literature was overflowing with articles about how you could utilize the platform more efficiently if only you knew some details under the hood. Moving away from Windows programming freed up a lot of mental resources. When I started programming in Java on top of all libraries and frameworks, I noticed that I was never really encouraged to look beyond the API. On the other hand, there were usually multiple implementations of those APIs, so if I wasn't satisfied with one, I could choose another. Of course, building GUIs in Java was (and still is) a real mess, so I didn't do that. Since then, I have programmed quite a bit in C# with the classic Forms-based platform on .NET, and this was a totally different experience from C++ and MFC. It was a delight. …

Original discussionHow Async/Await Works in C#132 source comments · at import
3

Community replies 0

No community replies yet. Add your perspective.

Replies from the source 3

Direct replies available in this import. Original-language excerpts.

KO

> MFC had its set of quirks, and development was quite painful I had the same experience. And then I learned win32, the C predecessor of MFC, and it all started to make sense. MFC is basically a horrible attempt to put an Object Oriented layer on top of win32. But they failed miserably at it. The API was so bad that I preferred just writing it in win32. And no, this was not a failure of OO, this was a failure of understanding and applying OO.

Full original
BR

One of my favorite things about .NET now being open source (along with the frameworks like ASP.NET) is that I can easily 'peek under the hood' for various functions that I use for edge cases/details. For example, with int.TryParse(myString, out int i), what happens if myString is NULL? The docs for most of the core .NET libraries are pretty good, but nothing beats quickly parsing through the actual code. This is especially true for various constructs in ASP.NET, where the documentation frequently lags behind newer versions, and by nature, can't capture all of the possible options. Digging deep into the core libs also makes you a better programmer by renforcing idiomatic patterns and exposing you to new techniques. Just the other day I dug into how ArgumentNullException.ThrowIfNull works, and discovered the newish (C# 10) attribute [CallerArgumentExpression("argument")] which gives you a …

Full original
SE

I think the idea behind such high level APIs is that they work well enough and are easier to use in 9X% of the cases and you can still get perf out of them if you look under the hood. For the reverse of your example, consider Java and .NET GCs. Most people don't need to tune Java GC and can just copy some config off stack overflow, however Java GC (GC-s, actually) tuning for perf and reading its verbose log is a whole dark art and there are tons of really long and verbose articles and example stories online. .NET GC is much more opaque in my experience, and that is really annoying when it doesn't "just work". async await makes writing async code stupid easy most of the time... much easier than in Java, although I haven't used Java in a few years, it could have improved. However when it doesn't quite work you need to look under the hood.

Full original
Continue on Hacker News

Respect different perspectives. Share concrete experiences.

Sign in to post, reply, repost, and quote.