Learn from different Perspectives

While on vacation last week, I read Jon Skeet’s Eduasync series. (Yeah I know, but I also had a lot of fun outdoors). It is a great description of how the async features work in the CTP (and how these features are specified to work in the upcoming version of C#). Jon’s posts explain how async features compile down to constructs you could write today. In some cases, you may need to go down to the level of IL to create the constructs the compiler generates on your behalf, but understanding Jon’s posts will provide you with a strong understanding of what the compiler does on your behalf.

That’s one way to learn: understand how a new language construct maps to existing constructs in your mind. Once that happens, you have a mental model from which to work, and you can use the new features. For a while, you’ll mentally translate the new syntax to the existing construct in your own mind, but eventually, the new constructs become more natural.

I prefer to explain these new features from a different perspective. Unless you are implementing a compiler, I think it is better to understand language features at a more abstract level. Rather than understand how new features are implemented, and how they map to existing constructs, try to understand what it does, and semantically what the new features enable. This give you a different mental model. It no longer matters how new features map to existing constructs. What matters is what new constructs mean.

In LINQ, for instance, I think it’s better to understand that the parameters to many of the methods in System.Linq.Enumerable is code. You’re treating code as data. I think that’s a more important concept than knowing that the compiler writes methods, creates delegates, and may create classes to implement closures. You’re treating code as data. That’s (to me) the important lesson to learn.

Different people learn differently. You should read from different perspectives, and figure out which perspective works best for you. In the meantime, read multiple sources and multiple perspectives.  I write from the perspective that I think enables the most learning. Jon writes from a different perspective. Sometimes I prefer mine; sometimes I prefer his. Most of all, I think seeing things from different perspectives helps the most.

Created: 7/6/2011 1:44:55 PM

Current Projects

I create content for .NET Core. My work appears in the .NET Core documentation site. I'm primarily responsible for the section that will help you learn C#.

All of these projects are Open Source (using the Creative Commons license for content, and the MIT license for code). If you would like to contribute, visit our GitHub Repository. Or, if you have questions, comments, or ideas for improvement, please create an issue for us.

I'm also the president of Humanitarian Toolbox. We build Open Source software that supports Humanitarian Disaster Relief efforts. We'd appreciate any help you can give to our projects. Look at our GitHub home page to see a list of our current projects. See what interests you, and dive in.

Or, if you have a group of volunteers, talk to us about hosting a codeathon event.