GraphQL is better than OData, and REST… So this guide will show you how to create a GraphQL API allows you to offer a flexible data querying interface where clients can request exactly the data they need. Here, we’ll create a simple GraphQL API in C# that returns data about music artists and their albums. Prerequisites To follow along, you need...
When it comes to designing software, the SOLID principles are the gold standard for object-oriented programming. While Rust isn’t an object-oriented language in the strictest sense, it offers plenty of tools to apply SOLID principles effectively. With enums, traits, and strict type safety, Rust provides a solid foundation for building flexible,...
Rust has garnered significant attention in the programming world for its focus on memory safety without the need for a garbage collector, making it an appealing option for systems programming, where safety and performance are both critical. By preventing entire categories of bugs like data races, buffer overflows, and null pointer dereferencing...
It’s easy to get carried away when you’re building a new web app. You’ve got big ideas, you picture millions of users flocking to your platform, and you start imagining the kind of infrastructure needed to handle all that traffic. So, you build for scale from day one—optimising databases, setting up powerful servers, and ensuring everything is...
Over the past few years, the evolution of AI-driven tools like GitHub’s Copilot and other large language models (LLMs) has promised to revolutionise programming. By leveraging deep learning, these tools can generate code, suggest solutions, and even troubleshoot issues in real-time, saving developers hours of work. While these tools have obvious...
JetBrains Rider has garnered attention as a modern, cross-platform IDE, especially for .NET developers. However, Visual Studio remains the reigning heavyweight in the development world, thanks to years of evolution and refinement. While Rider offers impressive features, there are still several areas where Visual Studio shines brighter. Here are...
When it comes to .NET development, Visual Studio has long been the go-to integrated development environment (IDE). However, JetBrains' Rider has emerged as a serious competitor, offering a fresh alternative with features that many developers now prefer. While both are powerful tools, here are five reasons why Rider is considered better than...
I use a lot of programming languages, I use them in different ways for different things because they are tools to do a job, just like a hammer is a tool to hammer in nails and a screwdriver (shockingly) drives screws… And while you can hammer in nails with a screwdriver, and you can drive screws with a hammer… They are not the best tools for...
In the modern web landscape, understanding how HTTP servers work under the hood can be incredibly empowering. While there are many frameworks and libraries available that abstract away the complexities of building an HTTP server, sometimes it’s valuable to get back to basics and see how things work from the ground up. In this tutorial, we will...
SOAP and REST have been the dominant protocols for years. However, GraphQL has emerged in the last few years as a powerful alternative, offering numerous advantages over its predecessors. In this article, we’ll explore why GraphQL is often considered better than basic REST and SOAP APIs, and why you might want to consider it for your next...
Dear Mr. Zelnick, I hope this letter finds you well. I am writing to you as a dedicated member of the Kerbal Space Program (KSP) community, a group that shares an unparalleled passion for space exploration and engineering, and whose enthusiasm for the franchise has only grown since the original game’s release. I am deeply concerned about the...
AI seems to be a very polarising subject. On the whole, most people seem to be in one of two camps: “AI IS THE FUTURE OF EVERYTHING!" or “AI IS TERRIBLE AT EVERYTHING! IT’S NOT INTELLIGENT AT ALL” (caps intended). The polarisation around AI stems from multiple factors, including misunderstandings, exaggerated expectations, fear of the unknown,...
PirateSoftware on Twitch took a stand against kernel-level anti-cheat in Helldivers 2 but found a workaround by buying a multi-thousand dollar second PC and plays it on there as a way of pretending they have “worked around” the kernel-level anti-cheat requirement. They are now pretending that the PSN account requirement for Helldivers, which was...
A lot of people use ToLower() or ToLowerInvariant() to normalise their strings before comparing them with ==, STOP IT. This is very slow, and while that may not matter for 1 or 2 string comparasons, it mounts up in large projects. While there is a very small use case for using Invariant Culture, unless you are absolutely certain that you need it,...
In software development, where time is very expensive and efficiency is paramount, it’s crucial to recognize and address common practices that can lead to unnecessary time wastage. This article aims to shed light on the professional nature of software developers, emphasizing the need for respectful and time-efficient communication within...
I have to preface this with “I am a man, not a woman, this is an opinion based on what I have seen in 20+ years of working as a software developer in many different companies”. With that, software development has a noticeable gender gap, with women underrepresented in comparison to their male counterparts. This disparity is a multifaceted issue...
ML.NET is an open-source, cross-platform machine learning framework for .NET developers, offering exciting capabilities in deep learning, data processing, and more. Given that Microsoft recently announced ML.NET 3.0, let’s take a closer look at what ML.NET 3.0 has in store. Deep Learning Takes Center Stage In ML.NET 3.0, deep learning scenarios...
Backend development in C# involves more than just writing code. To become a proficient backend developer, one must master a combination of programming language fundamentals and specific tools and frameworks. In this article, we’ll explore five essential skills that every backend C# developer should have, and we’ll delve into why each skill is...
In a groundbreaking announcement, Canonical and Microsoft have declared the general availability of “.NET Chiseled Ubuntu container images” for production use with .NET 6, 7, and 8. This release is the culmination of a year-long partnership and design collaboration between the two tech giants, aimed at optimizing containerized applications for...
As applications grow in complexity, the need for responsive and efficient code becomes paramount. Asynchronous programming in C# offers a powerful solution to handling time-consuming operations without blocking the main thread. This practical guide aims to demystify asynchronous programming in C#, providing a comprehensive overview and practical...
Design patterns offer reusable solutions to common problems in software design, providing a framework for creating flexible and maintainable code. In C#, understanding and implementing design patterns can significantly enhance the structure and efficiency of your applications. This practical guide will explore key design patterns in C#, providing...
C# 12 has arrived, bringing a plethora of features aimed at enhancing developer productivity, simplifying code, and boosting application performance. Let’s delve into the key improvements introduced in this latest version. Getting Started with C# 12 To leverage the new features of C# 12, developers are encouraged to download .NET 8, the latest...
Entity Framework Core (EF Core) is a powerful and widely used Object-Relational Mapping (ORM) framework for .NET applications. While EF Core simplifies database interactions, it’s essential to optimize SQL queries generated by EF Core to ensure efficient database performance. In this article, we’ll explore various strategies and techniques for...
In the current landscape of technology, Artificial Intelligence stands out as the transformative force with the potential to reshape industries and redefine how we interact with the world. While the capabilities of AI are undoubtedly impressive, a comprehensive understanding of its strengths and limitations is essential for harnessing its...
Programming languages play a crucial role in shaping the way developers write code. Among the myriad of languages, PHP and .NET stand out for their distinct approaches to naming conventions. In this article, we’ll explore the stark differences in naming conventions between PHP and .NET and the reasons behind them. The World of PHP: A Landscape of...
One thing that everybody would have assumed that Machine Learning/AI would have been good at, given it is very good at forcasting, anomaly detection and maths in general, is financial trading. The problem is that several studies have shown that AI running on some very powerful machines is no better than any given human trader. It made me wonder,...
A well-optimised database is the cornerstone of any high-performance application. However, as data grows and user demands increase, databases can face performance bottlenecks that hinder application responsiveness. In this article, we’ll explore some common database performance issues and strategies to overcome them. 1. Inefficient Queries...
Version control is a crucial aspect of modern software development. It allows multiple developers to collaborate on a project while keeping track of changes and managing code efficiently. Among the various version control systems available, Git has emerged as one of the most popular and powerful tools. In this article, we’ll delve into some...
Image recognition has become a fundamental component of many applications, from medical imaging, autonomous vehicles and even the ANPR cameras that make parking your car so much easier. In this article, we’ll explore how to implement image recognition using C# and harness the power of artificial intelligence (AI) to identify objects, scenes, and...
Harnessing the potential of artificial intelligence (AI) can elevate your C# applications to a new level of intelligence. In this article, we’ll explore how to seamlessly integrate AI into your C# projects, with practical examples to illustrate each step. C# is a versatile and powerful programming language that excels in creating robust...
It has recently been reported that Windows 11’s default always-on bitlocker protection, with software encryption, could be crippling upto 45% of your storage performance. To use Bitlocker with SSD Hardware full disk encryption, it’s crucial that your SSD supports TCG Opal and the eDrive standard (IEEE-1667). Unfortunately, many manufacturers omit...
Exception handling is a critical aspect of robust software development. Properly managing exceptions ensures that your application can gracefully handle errors and recover from unexpected situations. In this article, we’ll explore the best practices for effective exception handling in C#. Use Specific Exception Types When catching exceptions, be...
Code reviews are a crucial part of the software development process. They serve as a quality assurance measure, promote knowledge sharing, and enhance team collaboration. However, not all code reviews are equally effective. In this article, we’ll delve into the best practices for conducting productive and efficient code reviews within a...
.NET MAUI (Multi-platform App UI) is a powerful framework that empowers developers to build cross-platform applications with ease. In this article, we’ll guide you through the process of creating a desktop app using .NET MAUI. What is .NET MAUI? .NET MAUI is a modern, open-source UI framework from Microsoft that allows you to create applications...
Debugging in C# is not about removing bugs; it’s the process of understanding and isolating them before removing them. In the world of C# development, debugging is akin to being a detective. It’s the skill that separates a good developer from a great one. No matter how skilled you are in writing code, bugs are inevitable companions in the journey...
Selecting the right testing methodology can significantly impact the quality and reliability of your code. Two primary approaches, unit testing and manual testing, each have their strengths and are best applied in specific scenarios. Understanding when to employ each method is crucial for achieving a well-rounded testing strategy. Unit Testing:...
Greetings, aspiring software developers! As you embark on the path of professional software development, it is imperative to equip yourself with a solid foundation in key principles. Whether you are a seasoned coder or just beginning your journey, these fundamental concepts will serve as your guiding light in this dynamic field. Let’s delve into...
In the realm of API query languages, GraphQL and OData stand out as powerful tools that facilitate data retrieval and manipulation. While both serve similar purposes, they exhibit distinct characteristics that cater to different use cases and development paradigms. In this article, we’ll delve into the key differences and similarities between...
In the world of coding, there’s often a lively debate about which programming language reigns supreme. However, the real measure of a top-notch programmer isn’t their expertise in just one language, but their knack for seamlessly shifting between them. In this article, we’ll explore why it’s more important for a skilled coder to be adaptable...
When it comes to software development, the choice of Integrated Development Environment (IDE) can greatly influence productivity and code quality. Two heavyweights in the IDE arena are Microsoft’s Visual Studio and JetBrains' Rider. In this article, we’ll delve into the strengths and weaknesses of each, helping you make an informed decision for...
JavaScript has been the backbone of web development for decades, enabling dynamic and interactive web applications. However, as web projects grow in size and complexity, so do the challenges of managing code quality and catching potential bugs. Enter TypeScript, a superset of JavaScript that adds static typing and advanced tooling to the mix. In...
Go, also known as Golang, has surged in popularity for its simplicity, efficiency, and concurrency model. While it excels in certain domains, it may not always be the optimal choice for replacing C++. In this article, we’ll delve into some of the reasons why Go might not be the perfect substitute for C++. Lack of Low-Level Capabilities C++ is...
In recent years, Rust has gained significant attention and popularity in the programming community. Advocates often tout it as a worthy successor to C++, promising safer and more efficient systems programming. While Rust certainly has its merits, it’s essential to recognise that it may not always be the best fit for every scenario. In this...
In the fast-paced world of software development, burnout has become an alarming concern. Long hours, high pressure, and relentless deadlines can take a toll on even the most dedicated professionals. In this article, we’ll explore the root causes of burnout in software developers and provide actionable strategies to help prevent it. Understanding...
In todays world, productivity is the name of the game, especially in the tech industry where software developers are the driving force behind innovation. However, the idea that longer hours lead to greater productivity is no longer considered to be the case by most. Recent research and real-world examples suggest that cutting back on work hours...
In the fast-paced world of technology, where lines of code and lines of communication intersect, there’s a silent but significant force driving innovation – the mental wellbeing of tech professionals. Balancing the demands of a constantly evolving industry with personal wellness can be a formidable challenge. Yet, it’s a challenge that must be...
The Universal Render Pipeline (URP) is a powerful tool that can significantly improve the performance of your Unity game. By leveraging its features and implementing optimisation techniques, you can create a smoother and more responsive gaming experience. In this article, we’ll explore key strategies for performance tuning in Unity games using...
In the fast-paced and dynamic world of software development, an effective feedback culture is paramount for growth, innovation, and overall success. However, not all feedback is created equal. It is crucial to distinguish between constructive criticism and destructive blame, as they can have vastly different impacts on teams and individuals...
In Angular, Promises and Observables are both used for handling asynchronous operations, but they have some key differences in how they work and what they offer. Here are the main distinctions between the two: Primises Single Value: A Promise represents a single future value. It’s a proxy for a value not necessarily known when the promise is...
In today’s tech-driven world, being a software developer means more than just writing code. It means taking on the responsibility of ensuring that our creations not only work well but also do good. Let’s dive into some key ethical considerations for developers: Respecting User Privacy Think of user data like a trust fall - they’re putting their...
SQL injection attacks remain a significant threat to web applications. When using Microsoft SQL Server with ASP.NET Core applications, it’s crucial to implement robust security measures to prevent SQL injection vulnerabilities. This article outlines best practices and techniques to avoid SQL injection attacks in ASP.NET Core applications....
In the intricate landscape of software companies, a notable divide often emerges between the sales and software development departments. Sales is hailed for its immediate revenue impact, while development is sometimes misconstrued as a cost center. This article aims to dissect the reasons behind this prevalent gap and shed light on the distinct...
Entity Framework Core (EF Core) is a powerful and lightweight Object-Relational Mapping (ORM) framework for .NET applications. It simplifies database operations by allowing developers to work with .NET objects rather than writing raw SQL queries. In this tutorial, we’ll explore the fundamentals of using Entity Framework Core in C#. Getting...
The Marlin firmware is an open-source firmware widely used in 3D printers, known for its flexibility and extensive feature set. This tutorial will guide you through the process of building the Marlin firmware for the Creality Ender 3 using PlatformIO, a powerful open-source ecosystem for IoT development, and Visual Studio Code (VSCode), a popular...
In a previous job, I found that a coworker was spending a full work week building an excel spreadsheet from our Azure DevOps data, so I spent about an hour writing a small program to replace his entire job. This triggered an arms race between myself and the coworker where they would slightly change what they added to the excel spreadsheet, and I...
ML.NET provides a very simple way of performing Anomaly Detection on random variables as long as they are independent and identically distributed (i.e. daily sales totals recorded at the end of each and every day). With it also being possible to detect anomalies without requiring past examples beyond your dataset. Prerequisites Before we get...
Companies often claim that the operate a “no blame culture”, and then joke tht its actually a “know blame culture”. A “no blame” culture and a “know blame” culture may sound similar, but they have significant differences in their underlying principles and how they are practiced within a software development organization. This is particularly...
In recent years, the Zero Trust security model has gained prominence as a robust approach to safeguarding digital assets. However, when applied within a software development company, this policy can inadvertently hinder the productivity of software developers. This article delves into the specific challenges that arise when implementing a Zero...
In the fast-paced world of software development, achieving high levels of productivity is paramount for successful project completion. However, counterintuitively, overmanaging software developers can often lead to reduced efficiency and hinder the overall progress of a project. This article explores the reasons behind this phenomenon and...
Yesterday, Gamers Nexus posted a video titled “The Problem with Linus Tech Tips: Accuracy, Ethics, & Responsibility”, which addressed several concerns that GN have with Linus Tech Tips, the LMG Labs, and Linus Himself. This then sparked a long thread on the LTT forums where Linus himself responded to the video and several of the comments made by...
When it comes to choosing the right programming language, developers often find themselves faced with a myriad of options. Among these, C# and Java are two prominent contenders, each with its own strengths and weaknesses. In this article, we’ll delve into five compelling reasons why C# outshines Java, making it an exceptional choice for modern...
After being told by somebody on discord that it “is impossible to block elon musk on twitter”, when in fact, it is quite simple. I decided to make this post and this video to show just how simple it is. It is actually quite simple when you know how: Search for “elon musk” Click “…” button Click “block” DONE! Or watch the youtube video below:
GitHub hosts millions of different repositories, most are projects that developers are working on, but a fraction of them are valuable resources for learning. Over time, I have collected a list of repos that contain these valuable resources. Every Programmer Should Know No matter how much you know, you never know enough. “Every Programmer Should...
C# 12 introduces several features aimed at laying the foundation for future performance enhancements. These features include easy access to inline arrays, an experimental feature called interceptors, and enhancements to the nameof keyword. Inline arrays allow libraries to use them more conveniently without additional effort. They provide...
There are times when you need an application to just sit there in the background and deal with the same repetitive task over and over again. In dotnet core 3.0, a new type of template was introduced, “Worker Service”, which is a very easy way of creating Windows Services and Linux Daemons, and it is just as easy in dotnet 6 and 7 (if not, even...
Random numbers play a crucial role in various applications, from gaming to cryptography. In C#, generating random numbers is made easy with the help of the built-in Random class. In this article, we will explore different methods of generating random numbers in C# and discuss their applications. Method 1: Using the Random Class The most common...
As we all know, Windows 11 introduced the new centre aligned taskbar. The very first thing that most people wanted to do was move it back to the left, but it does not seem to be immediately obvious how to do so. It is actually quite simple when you know how: Right click on the taskbar Click “taskbar settings” Click to expand “taskbar behaviours”...
The mpu6050 works as an accelerometer and gyroscope, and is available as either a standalone IC, or as a breakout board and is usually conntected up via I2C (IIC, ICC or I2C or SPI, depending on your preference). I have added a mpu6050 raspberry pi pico library as part of my group of libraries at the pico-libs repository on github. The library is...
The ILI9341/ILI9342 works as display driver for a TFT display, and is available as either a standalone IC, or as a breakout board and is usually conntected up via SPI. I have added a ILI9341 raspberry pi pico library as part of my group of libraries at the pico-libs repository on github. The library is easy to use and is easily includable in your...
The BMP280 works as an ambient temperature sensor and air pressure sensor, and is available as either a standalone IC, or as a breakout board and is usually conntected up via I2C (IIC, ICC or I2C, depending on your preference). I have written a bmp280 raspberry pi pico library as part of a group of libraries over at the pico-libs repository on...
Object deep copy is a process of creating a new object instance that is an exact copy of another object. This process includes creating a new object with all the same properties and values as the original object. Object deep copy is usually used to avoid creating unwanted references between objects, or to create a separate object instance that...
Dictionaries are essential data structures in C# that allow you to store key-value pairs. Looping through dictionaries enables you to iterate over each key-value pair and perform operations on them. In this article, we will explore different methods of looping through dictionaries in C# and discuss their applications. Method 1: Using foreach Loop...
In C# string is an alias for System.String, So technically, there is no difference and they are exactly the same as comparing int and System.Int32, they will compile to exactly the same code. but… There is a complete list of all aliases to primative types (not all are primitive actually): object: System.Object string: System.String bool:...
If you work with literal strings that can contain quotes or language strings such as JSON, XML, HTML, SQL or Regex, raw literal strings may be the best new feature of C# 11. If you previously copied a literal string with quotes into a C# literal string, the string ended at the first double quote with compiler errors until you escaped each of the...
An OAuth 2.0 access token is usually a base64 encoded string that the client uses when making requests to the server, and can hides the user’s identity and other personal information from the client app/website and anybody listening in on the line. Access tokens expire after a certain amount of time and become invalid and cannot be used for any...
In angular 12, it is very simple to have the HTML of your component react to changes in the value of a single variable (or multiple variables). Although it is not that simple when you want to have your components HTML react to push/pop changes. Take the following component: export class TitleComponent implements OnInit { title: string = "default...
While updating my bittorrent library, I found that the uTP (Micro Transport Protocol) documentation is quite lacking, unless you already know how the protocol works, so here is my attempt to expand on the documentation that already exists in an effort to provide more information on implementing uTP. Information from BEP 29, bittorrent/libutp at...
This blog, and many others, are hosted using Amazon AWS. This one has a difference, it is almost completely free to host (and was completely free for the first year) because of Hugo, Amazon S3, Cloudfront, lambda@edge, Azure DevOps and (optionally) GitHub. This site is built using hugo, which is a “website generator” tool that lets you write your...
System.Net.Imap4 is an IMAP4 client library for .NET written in C# with support for parsing multipart, attachments, html and plain parts. It includes: Plain and Encrypted (SSL/TLS) Connections Fetching server capabilities Authentication (Plain only) Fetching folder lists/Folder selection Fetching Email Counts Fetching RAW email Fetching...
Microsoft recently announced .NET 5 (dotnet5) which is the unification of .NET Framework and dotnet core, leaving behind the divergance, and unifying the whole .NET platform. Why .NET 5 and not dotnet core 4.0 Given that Microsoft have already released .NET Framework 4.0 several years ago, they decided the best idea would be to skip the 4.0...
As of C# 7.1, it is possible with console apps, to have async all the way to the entry point. The previous constraints of the entry point have been the same all the way up to this point, and similar to the entry point in C/C++ apps. The C# entry point method must be static, the name of the method must be Main, the return type must be either void...
In C# and in .NET in general, there is a generic stack class which accepts a single type parameter. The stack class is a FILO (first in last out) collection, and can be liked to stacking plates, you cannot remove the bottom plate, without first removing all the plates above it. The problem with the Stack class is that it has an IEnumerable...
The C++ library (source on github) is designed to be a core neural network library, implementing basic neurons, layers and networks and comes with some basic learning methods too. The library is complete enough for those who want to learn and understand neural networks and how they are put together, but by no means is intended to be a complete AI...
System.Net.Torrent is an open source bittorrent scraper and peer wire implementation written in C# It includes: Tracker Announce (HTTP/UDP) Tracker Scrape (HTTP/UDP) PeerWire (TCP) Client Choke Unchoke Interested Not Interested Have Bitfield (Optional obsfucation) Request Piece Fast Protocol Extensions Extended Protocol Extensions ...
There are times when you need an application to just sit there in the background and deal with the same repetitive task over and over again. In dotnet core 3.0, a new type of template was introduced, “Worker Service”, which is a very easy way of creating Windows Services and Linux Daemons. The Basics The new “worker” template can be accessed in...
This is a short introduction into Dependency Injection for those who are new to dotnet core and C#, with an attempt to explain what it is, and how it works. So, what is Dependency Injection? DI is a programming method that makes each class independent of the other classes around it. Meaning that we don’t rely on our dependencies working exactly...
Applications feel more optimised when their binaries, or set of binaries are small. With dotnet core 3.0 there are some features built in that help facilitate this. Specify the build target First of all, you should specify your build target for your release builds, this will create a binary specifically optimised and targeted for that platform. A...
Something that annoyingly does not come as standard in the dotnet core console application template, and, it is not documented anywhere with Microsoft is: appsettings.json. This comes as standard with ASP.NET Core applications, but no other applications, and the thing is, it is very simple to add to any dotnet core application. The first thing...
Everybody has heard of the term “microservice”, but not many people know what they are, how they work, or how to implement one. Many people think they are a complex system that needs a lot of complex setup and management. In fact, they are a very easy way to remove heavy lifting from your web frontend to a more appropriate place. When developing...
Something that we all know is that there is a blame culture in business. Something that not many people know is that we don’t need a blame culture in business. Take this scenario: Worker A is tasked with Job A to be performed weekly Worker B is tasked with Job B to be performed daily One day, Worker B is away, and Job B needs to be performed...
For many developers, the normal 9 - 5 shift does not really apply. Development is a creative job, and you cannot force more creativity from more hours. For many developers, the normal 9 - 5 shift does not really apply. Development is a creative job, and you cannot force more creativity from more hours. Management seldom understand this and it can...
When developing applications for Windows, even Windows 10 or some flavour of Linux or BSD, you pretty much have free reign over what you want to do. When it comes to Android, iOS and Mac OSX, it is a different story. Well not exactly with OSX, that is more of a recent addition (restriction) in Sierra. I have spent the last five weeks...