Shorter code ≠ better code
There's an interesting post about how clever code is bad. It outlines some bad practices, and some good ones to use in their stead, such as the snippet:
// bad
while (*d++ = *s++);
// good
strcpy(destination, source);
But I'm here to hammer that point home and show to you that shorter code can, and often does, perform a lot worse than a readable alternative.
Designing a modular Discord bot framework
While I am extremely proud of this solution, I ultimately decided against it and settled on separating the bots as containerised services. Nevertheless, the solution here is still valid and useful for a variety of situations, and so I'm leaving this post up in the hopes that you or someone you know will find it useful.
For the better part of the past month or so, I've been rewriting the bot(s) which power the official Brackeys Community Discord server. This post isn't so much a guide, as it is a vent. A window into my process of dealing with the ever-growing enterprise-level codebase I've signed myself up for, and the hurdles I've faced. Enjoy.
State machines, a state of mind
This post was written by a guest contributor. As such, the advice presented here may or may not conflict with advice I've given in other posts, nor may it reflect my own personal opinions on the subject at hand.
Hello, You can call me Jade! I'm a programmer/game developer and I primarily work in the Unity game engine. I love state machines and I've made more than my fair share of them. In fact I'm relatively well known at this point for turning just about everything into a state machine!
In this guide I'm going to be teaching you about the basics of State Machines and how to get started with them!
Welcome to a madman's guide on the basics of State Machines.
The pitfalls of C#
If you've ever heard me talk about programming in any regard, you'll likely be aware that I simp for C#. I have never met any other language that lets me develop at the speed I'm able to. It is hands down my favourite language and I will challenge anyone who tries to change my mind.
But that doesn't mean it's perfect. C#, much like every other language, has its drawbacks. I'm going to talk about some of the features that I've stumbled across in other languages that accomplish some goal better than C#.
The paradox of altruism
Dear friend
Recently I've been thinking about how all the behaviour we exhibit towards others is driven by an insatiable need to preserve oneself. This, in a word, is known as “selfishness.”