Rebuilding the Rails IDE

Update 5 Now it’s getting interesting. I was able to get VSCode integrated shortly after LunarVim: Update 4 What a week! I swapped out the Scintilla and Monaco editors, excellent as they are, for LunarVim which contains many much needed plugins for development, such as an LSP for ruby. Another Ubuntu (WSL) console is used […]

Winforms Nostalgia

Had the chance to spoil myself today! I needed a tool to migrate and manage quotes from an old json format I had used in a Xamarin application. That provided the perfect excuse to jump back into C# and Winforms. It’s been a while, I must say, I’ve been in Java and Delphi a lot […]

Reverse Double Linked List in C#

This is a question that often comes up in an interview. The solution is simple, but under pressure it’s easy to get confused. To begin with, initialise three node references: Remember to point the tail to the head before we begin: Now, iterate over the nodes using current, until there are no more: Within the […]

XMPP Progress

The XMPP Component framework is coming on nicely. It can connect and send/receive messages: Using C# again is a joy. I absolutely love the dynamic capabilities. For example, in this factory method, Ping is dynamically added – it is not a property: Which produces the following XML: Eventually Ping will be its own subpacket, but […]

C# Null! Tip

C# 8.0 introduced non-nullable reference types. Sometimes, however, you want to late initialize a field, like in Kotlin: You can do this in C# using null! Usefulness C# non-nullable references are very useful, but you still need to be disciplined, code defensively, and make good use of guard classes. Null exceptions are not that hard […]

Enums and Literals

One of the things I love about C# is reflection. Because of assemblies and metadata, and an excellent supporting framework, it is very easy to take advantage of this paradigm. This week I threw myself into building an XMPP component framework from scratch. The first objective is to get the plumbing and architecture in place. […]

Concise C# Property Name

When constructing XML elements, it’s nice to have a concise API. One of the features I’m implementing is the ability to easily move up to a parent element. There’s no cascade operator in C#, like you see in Dart. Whilst exploring options, I found this works: Example usage: I thought that was interesting – albeit […]

Result or no Result

Recently I spent a couple of hours building a few classes to support some functional programming constructs in C#. At the end of the experiment, doubts have me backing out mostly. In certain use cases, the new constructs are a nice fit, but they can easily be overused. And their usage has a cascading effect […]

Activator.CreateInstance

One thing I love about using C# is reflection, it adds another paradigm to the toolkit. Recently, I revisited my old friend Activator.CreateInstance which is perfect for scenarios where you want to use generic code to create and initialize specific types of objects. Basic Example Some time ago, I wrote a simple application which plugs […]

Doxygen for C# and C++

Doxygen is a cross platform open source code documentation tool which I’ve used for both Visual C++ and C# .NET projects. It produces awesome documentation and is very easy to use. Configuration is straight forward using DoxyWizard. Doxygen can be configured to use Graphviz to produce call and dependency graphs. After installing Graphiz you’ll need […]