Using Node.js To Create a Discord Bot

Josh Green Development Technologies, JavaScript, Node.js, Programming, Tutorial Leave a Comment

From Zoom to Skype to Microsoft Teams, there is an endless number of platforms to help keep you connected. One such platform is Discord – a service primarily intended for gaming that allows you to voice chat, video chat, or screen share with a community you have developed on your own hosted “server.” One of Discord’s best features is a developer portal with an open API that allows you to add bots and apps to your server, as well as write your own.

There is true beauty in the ability to create your own custom solutions to fill your needs. So in this brief tutorial, I’ll show you how to get up and running writing your own Bots and Apps for Discord with Node.js.

Four Ways of Writing Thoughtful Code to Think Less

Ryan Brewer Opinion, Programming 3 Comments

Long before I was offloading brainpower to Stack Overflow, I sought to offload it for my future self (ahem, and teammates of course). I have a book to thank for this. Steve Krug’s “Don’t Make Me Think.”  It’s a critique of complex user interfaces.

Steve likes them simple and intuitive: the users’ goals are evident and easily accomplished.

Steve’s adage–“don’t make me think”–also plays a fair critique of the code we write. We can take that adage and apply it as a “DX First” approach to writing code. (An approach that admittedly should be sacrificed to UX or Performance Gods as needed.)

In this article I illustrate four high-level ways of elevating the developer experience to the forefront, helping us grok more while thinking less.

JavaScript Shortcuts from a Seasoned Professional

Brian Jacobs JavaScript, Programming, Tutorial Leave a Comment

I’ve spent the past 15 years of my career working as a web developer. Over those years, I’ve learned and created various shortcuts to help ease development. So, I figured I’d share them with you. This short write up lists some of the JavaScript tips and tricks that I’ve picked up during my career.

The first snippet I’ll cover is one I’ve only used in a very specific, unique circumstance. It may not be relevant to all of you, but I wanted to share for the few it would apply to. The rest are snippets I use on nearly a daily basis. No matter your situation or requirements, you should be able to find at least one that you can adopt.

Refactoring: Ugly Code That Does Everything

Gabe Schmidt Development Technologies, JavaScript, Node.js, Programming, Tutorial Leave a Comment

If you’ve been writing code for a significant amount of time, you’re sure to have seen the—anything but godly—“God Method.” It’s a method that performs way too many processes in the system and has grown beyond all realistic logic to become “The Method That Does Everything.”

This single unsightly method can span dozens, if not hundreds, of lines. Sometimes even over 1,000! This type of “ugly code” is an unbearable beast to maintain. This is why it’s considered a “code smell” or anti-pattern.

In this tutorial, we walk through a tangible “God Method” and step through the process to refactor it into something more manageable and human-readable. Our code is written in JavaScript for a Node.js service, but the principles apply to any language.

Using Jest and Testing Library with React Native Part I: Setting Up

Justin Leach Development Technologies, JavaScript, React, React Native, Testing, Testing React Native Series, Tutorial Leave a Comment

In this post, Part 1 of Using Jest and Testing Library with React Native, I’ll give a brief introduction to Jest, Testing Library, and React Native. Then, we’ll walk through how to set each of them up. This will prepare us for Part 2, creating our first test.