So this is a pretty neat project I intermittently work on. This is a discord bot using the Discord.NET wrapper from RogueException. It makes use of the onion architecture and I tend to think while indeed a small project at this time, is the best showcase of my growth as a programmer and knowledge of OOP.
One really neat feature I love to draw attention to is the command system. I sometimes get called out for overengineering the solution, but I highly disagree. One thing I've really bought into is the idea of future-proofing your application. Most discord bot command systems use hard-coded strings somewhere to dictate what command is being parsed. Something many programmers do is use a switch statement. This is fine, however I understood that as the needs for the discord server I administrate grow so will the scope of this project. I needed a more... automated solution. The idea came to me to use reflection for this so I could create/delete classes that were prefixed with the command and compiled at run time in order to be parsed and executed. Long night made short, I evolved from using Activator to compiling lambda expressions which displayed a HUGE performance increase (almost near raw hardcoded performance). This allowed me to have a solution where I don't need to manually maintain a switch block or refactor strings in the event commands change.
Hope y'all dig it!
Blog Writeup: https://reiko.tech/Blog/View/8
So early this morning I did a live lesson on WPF that basically touched on design, MVVM, data-binding and commands. This video is definitely considered long, however my goal was not just to teach my viewers a certain way of doing it and leaving it at that, but to also go through other ways and why it's wrong. For example one thing I touch on is why the ideology that no code should exist in your code-behind is a good one.
So here's the YouTube version of the lesson with the only edits being done to the start/end times. 😁
C# - WPF Basics (In-Depth Lesson/Stream)
Source as of current lesson: https://github.com/reikotechnology/chatty