Enabling TLS 1.2 in your .NET framework applications

A functionality of one of the products I’m working on suddenly stopped working without any code changes on our side. Our application connects to a web service to get some data and that no longer worked, our customers getting the following error in their logs “The underlying connection was closed: An unexpected error occurred on a send.” The first thing to do was checking whether the web service was still up and running as expected. The requests made with SoapUI or Postman were all successful, so it was actually something in our application that was actually wrong. So I decided to use Fiddler to look at how our requests look and what do we get back.

Three productivity features in the Visual C++ 2017 debugger

Visual Studio 2017 has had a larger number of updates throughout its lifetime. At the time of writing this article, there have been ten major updates and countless minor ones. You can check the release notes history for details. Part of the changes was in the debugger. In this article, I will mention three features…

Putting the fun in C++

The post-Kona mailing list of the new standards papers has been recently published (you can find it here). Going through the titles I could not help smiling because some of them are really funny. So I decided to make a top 10 of the funniest paper titles.

Little-known C++: operator auto

A user-defined conversion function enables an implicit or explicit conversion between types. Such, a function has the following form (no return type and no parameters):

struct foo
{
   operator int() const {return 42;}
};

foo f;
int i = f;  // implicit conversion

Little-known C++: function-try-block

Function-try-block is a mechanism in C++ to establish an exception handler around the body of a function. The following is an example:

int foo() 
{
   throw std::runtime_error("oops...");
}

int main()
try
{
   foo();
   return 0;
}
catch (...)
{
   return -1;
}

C++ code samples before and after Ranges

The Ranges library proposal has been accepted for C++20 at the San Diego meeting of the standard committee in November last year. The library provides components for handling ranges of values aimed at simplifying our code. Unfortunately, the Ranges library is not very well documented, which makes it harder to grasp for those that want to learn it. This post is intended as an introduction based on examples of code written with and without Ranges.

A first look at Visual Studio 2019

The first preview version of Visual Studio 2019 is available since the beginning of December 2018. I decided to take a look to see what is different from the previous Visual Studio 2017 version. In this post, I will present some of the things that are new or changed in this new version.

Advent of Code 2018

I have recently come across a website that proposes a series of programming challenges throughout December, until Christmas. It’s called Advent of Code and this is the fourth year it runs this competition. Every day, a new challenge is made available, and each challenge has two parts. You only get the second part after completing the first. It does not matter what programming language you use for solving the challenge, nor how the code looks or how fast it executes. The only thing that matters is the result.