C# 10 new features

LINQ Improvements in C# 10

Adam Wright Articles, C#, Development Technologies & Tools, Programming Leave a Comment

C# 10 was released in November of 2021, and it came with a host of new features. Some of the features that you may have heard of include file-scoped namespaces, global usings, target-type new expressions, record improvements, and many more. Several new extension methods have been added to LINQ as well including MaxBy, MinBy, DistinctBy, IntersectBy, ExceptBy, and UnionBy.

In this post, we will take a look at the aforementioned new C# 10 features and how they work.

JASMINE SPIES UNIT TESTING

Unit Testing Using Jasmine Spies

Todd Leininger Articles, Development Technologies & Tools, Programming, Testing, Tutorial Leave a Comment

Unit testing is an important part of the development process. It gives us the ability to know that our code is working as intended and can also let us know if we may have broken something that we didn’t even think of.

With the help of Jasmine Spies, we can make our test setup easier, and we can give ourselves more options for what we can test against. Hopefully, this will give you a good starting point for all your Jasmine spying needs!

Use best practices like SOLID principles when converting legacy code

Legacy Code: Use Best Practices Like SOLID When Converting

Geoffrey Blogref Articles, Modernization, Opinion, Programming Leave a Comment

This blog is about converting legacy code betterโ€”using architecture already in place, SOLID principles, and best practices.

Generally speaking, not having an architectural plan set up (or not using SOLID principles and best practices) can lead to passing the buck to the next generation of developers. We should all strive to push good code forward to get the latest and greatest out there. Starting with following the patterns in place at your job, or SOLID best practices, will make converting and upkeep way faster in the future.

This post contains a discussion of my experience in various software team environments. Throughout them all, we show that if SOLID patterns and best practices had been followed, then time spent converting code would have been less and code upkeep would have been easier down the line.

Preventing Layout Shift

Using CSS Grid to Prevent Page Jank

Lawrence Chabela Articles, CSS & HTML, Design, JavaScript, Programming, Tutorial Leave a Comment

Layout shifts, or page jank as I like to call it, rears its ugly head when a visible element changes position or dimensions, causing the position or dimensions of content around it to be changed.

There are too many possible reasons behind a layout shift to cover in one post, so Iโ€™ve narrowed it down to one in particular for the sake of brevity. In this article, we will discuss this scenario: a component changing its height due to its state being changed from user interaction.

I know that this is a relatively isolated example, especially in the grand scheme of things. However, I think this proves an important point. Solving a layout shift doesn’t always have to be a tedious and complicated process to fix. Sometimes, scenarios like this can easily be solved using the CSS we already have at our disposal.

Node.js for Discord Bot

Using Node.js To Create a Discord Bot

Josh Green Articles, Development Technologies & Tools, 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.