C# v7.0 pattern matching

Visual Studio “15” Preview 4 was recently released, so I decided to take it for a spin. In the upcoming C# 7.0, of the features being implemented, pattern matching is probably the most interesting. Consider how often we’ve designed code that uses a switch statement with complex cases, but then when we go to implement the design, a nested if-then-else statement must be coded instead because switch labels … Continue reading C# v7.0 pattern matching

Alternatives to Deeply-Nested Callback Functions in Javascript

A few days ago, I wrote a server in Node.js, the purpose of which is to email me when an API found in Nuget is updated. I thought the project would take a few hours, but as it turned out, it took several days. You may ask “How is this possible for such an easy problem?” Unfortunately, I spent a lot of time trying to figure out what API to use to read a text file, and how to use the API. It led me to an understanding of a fundamental problem with Javascript known as “callback hell” (1, 2).

Continue reading “Alternatives to Deeply-Nested Callback Functions in Javascript”

Resources for C# WebSockets

WebSockets is a communication protocol on TCP between a web browser (or other client) and a server. It is full-duplex, event-driven. One important advantage of the technology is the elimination of the client polling of the server. The following post lists some resources for C# WebSockets (1). C#/WebSocket Resources System.Net.WebSockets (client only) https://www.nuget.org/packages/System.Net.WebSockets/ First release Monday, June 27, 2016 http://www.infoworld.com/article/3088338/application-development/how-to-work-with-web-sockets-in-net.html Cannot target NET Portable 4.5 framework. WebSocket4Net (client only) … Continue reading Resources for C# WebSockets

Runtime Performance of NET Core vs. NET Framework vs. Mono

With the release of NET Core, the acquisition of Xamarin and Mono, and the 15 or so years of development of the NET Framework, we now have three platforms to choose from for C#. Why are there three platforms? What are the differences between each? And, what is the performance of the three to each other? From the NET Core Roadmap, it’s clear that Microsoft is trying to focus … Continue reading Runtime Performance of NET Core vs. NET Framework vs. Mono

Xamarin logo

Cross-Debugging Mono C# Executables Running on Linux

Debugging C# programs that run on a Linux server can be a challenge. On Ubuntu, a server may not have the Unity GUI installed, so you can’t use MonoDevelop. Even if the server had the GUI, MonoDevelop often does not work with a C# project because it doesn’t support many Visual Studio 2015 projects. Visual Studio supposedly can cross-debug a program running on Linux from a Windows box, but I … Continue reading Cross-Debugging Mono C# Executables Running on Linux

Installing Docker

OK, really simple. I want to install Docker on an Ubuntu box. Should be easy. Right? Wrong! When I do a Google search for “install docker”, Google returns a link to the Docker installation page for Ubuntu. That’s fine, but following the 18 page/2000 word installation is insane. The first time I did that, it took 15 minutes. What a waste of time, and not … Continue reading Installing Docker

Mongo, Restheart, and Dokku

Mongo is a popular NoSQL database nowadays. It has several advantages compared to relational databases (schema-less, key-value store, scalable, distributed, propagated consistency) but the main advantage, IMHO, is that JSON is the lingua franca for the data structures it stores and the queries you use. JSON is a nice, simple data structure representation. It can be easily passed between the database and the application; and it can … Continue reading Mongo, Restheart, and Dokku


GoDaddy left at the Docker

I’m in the process of checking out the advantages and disadvantages of GoDaddy’s new Cloud Server product, which has just been announced as generally available. It has few features, less compared to DigitalOcean, which has been available for a few years. AWS, which has been available for even longer, is generally the gold standard–if you like, or need, a cloud platform with every conceivable tweakable … Continue reading GoDaddy left at the Docker