Armored Dragon Blog
Blog
Sharper and Sharper

Greetings all! I am back with more me! *applause*. These two weeks have seen good movements in good directions and I am proud to see where I go in the next two weeks.

Programming

I have been hard at work in the shop refining my programming skills. This cycles goal is to learn a entire new language! After so many years of wanting, I can now say I am doing. I am learning the C# programming language.

I wanted to start learning C# as one of my first languages, however when I started programming I found (incorrectly) that C# just isn't as useful compared to some other languages. I ended up settling on JavaScript to learn as my first real programming language because of wide use on the web.

JavaScript had a lot of packages available like ExpressJS (Website hosting), ElectronJS (Stand-alone desktop apps), and potentially mobile apps, but I had not looked too super deep into that last one. There were a few packages I was looking at but none of which seemed to do all that I wanted without a lot of dead weight. Dead weight in the form of massive bloat, abandonware, incompatibility, or even the package being too young.

As I matured into real programming I found myself wanting to produce lighter and more efficient code. Electron has recently (relatively speaking) hit the internet like a computer worm hits a local network. Every app and then some seems to be an Electron app these days. This does come with some benefits naturally such as a unified codebase for a web interface and a standalone app, however this does come at a cost. Performance.

I want to maximize performance and efficiency of my projects so I finally took the plunge to learn efficient C# coding.

Now saying all of this, I'm not just giving up JavaScript and packing up shop, never to use it again; far from it! It is hard to beat ExpressJS in my case because I have already spent a few years learning and becoming comfortable with it and the packages along with it. However I will be transitioning to use a lot more C# in my projects.

To compound this, I am learning game dev and you likely know, C# is used widely in game dev, even in GoDot, my engine of choice, can use C#.

Project 4

Working title (Fractal)

To start; I have started work on designing a chat app. Why? To try!

I was inspired by Matrix, both in part to it's federated and E2EE features, and by the very few voices yelling about "Muh security" on Matrix. Very few people claim that Matrix is super insecure and literally glowware, but as Matrix is FOSS people can just audit the code. At this point if it were glowware, we would know. However those cries have inspired me to really dive deep into what makes Matrix tick. Matrix to me has a lot of "Wow that's stupid" or "Why did the Matrix team do it like that?" or "This is unnecessary" in it. I wanted to really see why things are the way they are on Matrix. As with most projects I copy-cat, I wanted to fully appreciate all of the effort that has gone into Matrix. To achieve this, I will be remaking it in my own image with my own needs.

The primary missions for Project 4 are:

Secondary objectives include:

That is however only the client goals. As I mentioned before I was inspired by Matrix. Matrix is a federated messaging system. I too want to have that federation. This means I will need to have a server. I will maybe try to make the server using C# to learn how to actually make a C# server, however as I use Linux as my OS of choice it will be a little wonky to use as Visual Studio does not run on Linux, and JetBrains (Another non-free IDE) costs a lot of money.

JetBrains? Why bring that up?

I'm glad you asked, me! JetBrains is one of two officially supported platforms for the GUI I am using to build this app. I am using Avalonia UI to build this app. Avalonia is my first GUI "programming" software that I have ever used to generate a user interface that doesn't use HTML at all! Don't get me wrong, it's almost kind of similar, but it's more closely compared to XML. I would think so at least.

Encryption: Double Ratchet edition

Upon my research on how Matrix handles E2EE, I discovered they used a type of encryption algorithm I hadn't seen before. Well, I have, but that's unrelated. Matrix uses a Double Ratchet algorithm to encrypt messages. I am still learning about it, I actually have a video about it paused as I write this paragraph discussing more in depth about it, but it seems far better than what my solution was. I was initially going to use a simple GPG key, and broadcast the public key from a server every time someone has sent a message. As a very brief example:

The scenario

There were a few glaring problems with this approach.

The double ratchet algorithm is basically what I wanted to do, but better!

I don't mean to toot my own horn, but to see how close my solution was to the one commonly used by people who actually know about this stuff really brightened my day.

I can't give a good example on how I would implement this algorithm in my project as I am still very new on the subject, but I can say I will code with confidence now that my sight is clear.

This project will also greatly help my work on my Overte chat application. I'm not sure why I make so many chat applications, but at this rate I will build the best one, I'm sure of it.

Why do we need yet another chat app?

Great news! We don't! Project 4 isn't supposed to be a replacement for Matrix. Far, far from it. It's an exercise for myself on why Matrix is the way it is. My discovery of the Double Ratchet algorithm already gave me a lot of explication on why a lot of things are the way they are on this platform.

Project 4 is only being made as an exploratory project to refine my skills in C#, Message encryption, Avalonia, and UI design.