Michael Sorens

Michael Sorens is passionate about productivity, process, and quality. Besides working at a variety of companies from Fortune 500 firms to Silicon Valley startups, he enjoys spreading the seeds of good design wherever possible, having written over 100 articles, more than a dozen wallcharts, and posted in excess of 200 answers on StackOverflow. You can also find his open source projects on SourceForge and GitHub (notably SqlDiffFramework, a DB comparison tool for heterogeneous systems including SQL Server, Oracle, and MySql). Like what you have read? Connect with Michael on LinkedIn

Follow Michael Sorens via

28 June 2017
28 June 2017

Fighting Evil in Your Code: Comments on Comments

One of the most glib generalisations you can make about development work is to say that code should be liberally commented, or conversely that it should never be commented. As always, the truth is more complicated. There are many different types of comment and some types are best treated firmly with the delete key, where others are to be cherished and maintained assiduously. Even though it is hard to find two developers who agree on the topic of commenting, Michael Sorens warily sketches out the issues and the battleground.… Read more
19 May 2017
19 May 2017

High Performance PowerShell with LINQ

PowerShell is a scripting language, and like all scripting languages it struggles to perform well with rapid iterative processes such as aggregation. It isn't well-known that PowerShell can use LINQ for many of those tasks which would otherwise use iteration, though somewhat awkwardly. However, some of the speed improvements you can get are startling. To get you well started, Michael explains every LINQ function , gives you example code in C#, The PowerShell way of getting the result, and finally Powershell's use of LINQ. This article could change the way you use PowerShell.… Read more
25 April 2017
25 April 2017

A Visual Lexicon of LINQ

0
26
LINQ is best learned from examples, but few LINQ resources supply, along with the code, pictures that illustrate what each associated LINQ operator in the code is doing. This article is a visual index of all LINQ operators, that explain clearly with code and illustrations what even the most arcane LINQ operators actually do. To increase your enlightenment, it is accompanied with a reference chart to provide even more detail. Michael Sorens is, with these two articles, determined to persuade you of the power of LINQ.… Read more
0
26
25 April 2017
25 April 2017

A Visual Lexicon of LINQ: The Wallchart

0
13
Here is a handy wallchart that condenses the information contained in our article 'The Visual LINQ Lexicon' even further, but which adds some more technical specs that allow you, for example, to see at a glance which operators use deferred execution and which use immediate execution. You can use it to see what operators use lambda syntax and which ones are available in query syntax. You can see all the other key properties of all the LINQ operators, even including even how much of a sequence a given operator actually consumes. Click here to download the PDF version of the reference chart: … Read more
0
13
06 April 2017
06 April 2017

Ten Unsung Visual Studio Time-Savers

0
12
We all have our favourite third-party extensions to Visual Studio, and although we all like Resharper, there are many others that could well make your development work easier. To celebrate the fact that Visual Studio Enterprise now includes ReadyRoll Core, SQL Prompt Core, and SQL Search as part of the Data storage and processing workload, Michael Sorens describes nine of his current favourite extensions, and wonders if he's missing anything in his list.… Read more
0
12
30 January 2017
30 January 2017

PowerShell Time Saver: Automatic Defaults

Because PowerShell needs to be usable as an immediate scripting language by IT professionals who type in commands at a console, there have to be language devices such as aliases that can make for terseness when appropriate. There are several ways of cutting down the verbiage in a script, and being able to specify default values via $PSDefaultParameterValues is one of the more generally useful ones. Michael Sorens explains how it can save you time in your daily work.… Read more
05 January 2017
05 January 2017

Code Smells: Raw Strings and the Subtle Syntax Catastrophe

0
14
All sorts of complex data can be represented as a string but that doesn't mean you can treat them merely as strings. There are so many things that can go wrong if you assume that generic string operations such as concatenation can serve to create complex markup, expressions, codes and serialised objects. It pays instead to create dedicated builders for any such complex data that you may need to create. Michael Sorens explains some defensive coding to make for a more robust application.… Read more
0
14
01 December 2016
01 December 2016

LINQ Debugging and Visualization

0
22
LINQ is certainly extraordinarily useful. It brings the power of query expressions to C#, allowing an easy way of getting the data you need from a variety of data sources. Up to now, there hasn't been a VS debugger for LINQ that gives you the means to visualise the data at every point in the chain. Michael Sorens, a keen LINQ user, describes a third-party tool that now promises to make using LINQ something we can all participate in.… Read more
0
22
15 November 2016
15 November 2016

Development Delusions: That it is Enough to Build a Better Mousetrap

You've written a superb, clever, application that you are trying to encourage your colleagues to use. They're not interested. Why? You've neglected the documentation. Surely, the saying goes 'Build a better mousetrap and the world will beat a path to your door'? Nope, not without comprehensive and complete documentation and marketing, it won't. Documentation is the secret of ensuring that good software will succeed. … Read more
06 October 2016
06 October 2016

4 Keys to a Clean Angular Implementation

Can there be true separation of concerns with MVC? Not entirely, especially when Angular's templates allow you so much flexibility; but there is a great deal to be gained from following guidelines to ensure that all business logic is performed in the code-behind as directed by the controller or its delegate, and that all operations on the model are done in the controller: Michael Sorens explains the four essential guidelines for an easily-maintained system.… Read more
22 July 2016
22 July 2016

Using C# to Create PowerShell Cmdlets: Beyond the Basics

It is just the first stage to make your C# Cmdlet do what it is supposed to do. Even though cmdlets are used at the commandline, they need a whole range of features to make life easier for the end user. These include such refinements as providing documentation, validating inputs, providing a manifest, and implementing the common parameters.… Read more
10 May 2016
10 May 2016

Continuous Delivery from the 19th Century to TODAY

It somehow feels like the end of an era. The National Weather Service of the USA's National Oceanic and Atmospheric Administration (NOAA) provides AWIPS 2 (The Advanced Weather Interactive Processing System) which has now advanced to the point that allows for the change to mixed-case letters. The switch will happen on May 11, after the required 30-day notification period to give customers adequate time to prepare for the change. Grief counsellors?… Read more
22 April 2016
22 April 2016

Unified Approach to Generating Documentation for PowerShell Cmdlets

Now, it is easy to provide professional-quality documentation for PowerShell cmdlets, and to keep it in sync when you make changes, whether they are written in PowerShell or C#. Whereas this has always been easy to do in PowerShell, it was always painful to do in C# or VB because it meant having to build your own MAML file. Michael completes his three-part series by summarising, in a wallchart, how to go about it. … Read more