Saturday, July 22, 2017

Difference among .NET Mutable, Readonly, Immutable, and Freezable Collections

Mutable 
Mutable is the most common collection type in the .NET world. These are collections such as List; that allow reading, as well as adding, removing and changing items.

Read-Only
Read-Only These are collections that can't be modified from the outside. However, this notion of collections doesn't guarantee that its contents will never change. For example, a dictionary's keys and values collections can't be updated directly, but adding to the dictionary indirectly updates the keys and values collections. You can create your own read only collection by inheriting from ReadOnlyCollection.

Immutable
Immutable These are collections that, once created, are guaranteed to never be changed and thread-safe. If a complicated data structure is fully immutable, it can always be safely passed to a background worker. You don't need to worry about someone modifying it at the same time. This collection type is not provided by the Microsoft .NET Framework base class library (BCL) today. You can download from NuGet by searching for Microsoft.Immutable.Collections.

Freezable
Freezable These collections behave like mutable collections until they're frozen. Then they behave like immutable collections. Although the BCL doesn't define these collections, you can find them in Windows Presentation Foundation.

Wednesday, April 05, 2017

What’s New and Improved in Resharper 2017.1

If JetBrains is a sports team, I’d be a fan of it, just like I am a fan of Houston Rockets. JetBrains has so many good products, Resharper, dotMemory, dotCover, and dotTrace. Don’t forget TeamCity, it is really an awesome build tool.

I agreed to a saying at Houston TechFest 2016, from a great speaker Curtis Schlak, that Visual Studio and Resharper make the developer’s mind dull because the tools like Resharper do a lot and developers start to lose the skills to do it manually. Sadly that’s the side effect for using Resharper. Just like I won't be able to remember my best friend's phone number any more after my iPhone can remember the numbers for me. I guess there are always pros and cons. I  think I need to be aware of the side effects to use Reshaper. But I don’t think I’ll let Resharper go out of my developer’s life.



Way to go JetBrains Resharper. Here are the good stuff  in 2017.1. 
  • C# 7 support with new inspections and quick-fixes
  • Support for the Lightweight solution load mod
  • .NET Core unit testing support in Visual Studio 2017
  • Many code formatting improvements including support for EditorConfig
  • Filtering options in Find Results , Go to Everything , and Go to Text
  • Full support for TypeScript 2.1 and initial support for TypeScript 2.2
  • Initial support for Angular 2

Thursday, March 09, 2017

First impression on Visual Studio 2017

Visual studio 2/017 gets it right this time.
Even the icon looks cool.


VS 2017 Installation Screen Shot


Improved startup and improved project load. Lightweight solution loading, and many more enhancements come together to make Visual Studio 2017 start up to 3 times faster than Visual Studio 2015. Solution load times are 2-4 times shorter, and build performance is faster too.

Snappier XAML Editor. It  is snappier, a lot. It’s so much faster than 2015 – lighting faster. This is because Visual Studio 2017 leverages the XAML Language Service’s knowledge of the XAML file to determine the names and types of the fields to populate IntelliSense, and then update the g.i.* file using Roslyn on a background thread.

dotted lines for XAML
Dot Lines are awesome in the C# editor and XAML editor.



















Be A Developer That Uses AI

Developers will not be replaced by AI, they'll be replaced by developers that use AI. Generative AI tools are revolutionizing the way de...