Articles tagged

The Zen of Code Reviews: Review As If You Own the Code

A code review is a serious business; an essential part of development. Whoever signs off on a code review agrees, essentially, that they would be able to support it in the future, should the original author of the code be unavailable to do it. Review code with the energy you'd use if you owned the code. Michael Sorens runs through the principles of reviewing C# code.… Read more

Using C# to Create PowerShell Cmdlets: The Basics

Although PowerShell Cmdlets are usually written in PowerShell, there are occasions when the level of integration with existing C# or VB libraries is awkward to achieve with PowerShell. Yes, you can write Cmdlets in C# perfectly easily, but until now it has been tiresome to discover how. Now Michael Sorens shows you the simple route to writing effective C# Cmdlets.… Read more

What’s New in C# 6

The C# language itself has changed little in version 6, the main importance of the release being the introduction of the Roslyn .NET Compiler Platform. However the New features and improvements that have been made to C# are welcome because they are aimed at aiding productivity. Paulo Morgado explains what they are, and how to use them.… Read more

Documenting Your PowerShell Binary Cmdlets

Whereas it is easy to provide inline documentation for a normal scripted PowerShell cmdlet or function so as  to provide comprehensive help at the command-line or IDE, the same isn't true of binary cmdlets written in C#. At last, there is an open-source utility to assist with this that is being actively maintained and updated. At last, binary cmdlets need no longer be the poor cousins of scripted cmdlets in their documentation… Read more

Developing a Custom SSIS Source Component

SSIS was designed to be extensible. Although you can create tasks that will take data from a wide variety of sources, transform the data is a number of ways and write the results a wide choice of destinations, using the components provided, there will always be occasions when you need to customise your own SSIS component. Yes, it is time to hone up your C# skills and cut some code, as Saurabh explains.… Read more

Generating Test Data in TSQL

To test SQL, you need test data. There are usually many reasons why you can't use production data. Although it is usually enough to use a utility to generate test data, sometimes your requirements will compel you to resort to code to supplement this. Hugo shows how he used SQL and C# to generate large volumes of test data involving related columns and complex distributions.… Read more

Fluent Code in C#

In LINQ, the 'fluent' method syntax flows logically and intuitively, and allows them to be combined simply, because each method returns the appropriate type of object for the next. Can this fluent technique be extended as an API style to make it easier to develop C# team-based applications for enterprises? … Read more

Bertrand Meyer: Geek of the Week

Bertrand Meyer, the author of 'Object-oriented Software Construction', renowned teacher, and designer of the Eiffel programming language, believes in simple elegant computer languages. Java, C# and Python all owe much to his pioneering work with Eiffel. He was also deeply involved with .NET from the outset. … Read more

C# Async: What is it, and how does it work?

The biggest new feature in C#5 is Async, and its associated Await (contextual) keyword. Anybody who is faced with creating Metro applications for Windows 8 is having to tackle the very different mindset of Async Programming. Clive explains what is happening under the covers and how one can investigate, using .NET Reflector.… Read more

On Writing Unit Tests for C#

Is it realistic to keep to principles of 'Test-First' and 100% coverage for unit tests when in the heat of developing commercial C# applications? Does rigorous unit-testing lead naturally to good design by enforcing testability, low coupling and high cohesion? Patrick Smacchia gives his opinion based on hard-won experience. … Read more

Eric Sink: Geek of the Week

Eric Sink became well-known for his work with the Spyglass browser, which was acquired by Microsoft and morphed into Internet Explorer. Since then, he has succeeded at the difficult double-act of combining programming and the software business. He is living proof that it is possible to master both skills.… Read more

Defensive Error Handling

TRY...CATCH error handling in SQL Server has certain limitations and inconsistencies that will trap the unwary developer, used to the more feature-rich error handling of client-side languages such as C# and Java. In this article, abstracted from his excellent new book, Defensive Database Programming with SQL Server, Alex Kuznetsov offers a simple, robust approach to checking and handling errors in SQL Server, with client-side error handling used to enforce what is done on the server.… Read more

Brian Kernighan: Geek of the Week

When anyone mentions 'Kernighan and Ritchie', we all know what they are referring to: that brief book that introduced the C language to programmers, and set a high standard for all subsequent books on computer languages. Now over thirty years later it is still in print and translated into over 20 languages, being required reading for undergraduates. We sent Richard Morris to interview Professor Brian Kernighan… Read more