Getting Xamarin.Forms apps working with .NET Standard and Roslyn

Recently, I was trying to write a Xamarin.Forms app that uses Roslyn, Microsoft’s NET languages compiler framework. But, no matter what I did, it seemed as though it wasn’t possible. But, I tried a few things, and noticed that the Roslyn library could link with Android and iOS applications. That’s when I realized it might be possible. That said, it depends on what you will … Continue reading Getting Xamarin.Forms apps working with .NET Standard and Roslyn

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

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