The Angry Dev

Recent content on The Angry Dev
https://www.darrenhorrocks.co.uk/ (RSS)
visit blog
How To: Create a Basic GraphQL API with dotnet in C#
9 Nov 2024 | original ↗

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...

SOLID Design Principles Rust (with examples)
25 Oct 2024 | original ↗

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,...

Why Rust and Its Memory Safety Lulls Developers Into a False Sense of Security, Leading to More Serious Bugs
2 Oct 2024 | original ↗

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...

Stop Designing Your Web Application for Millions of Users When You Don’t Even Have 100
15 Sept 2024 | original ↗

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...

Why Copilot is Making Programmers Worse at Programming
11 Sept 2024 | original ↗

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...

Five Reasons Visual Studio is Better than Rider
11 Sept 2024 | original ↗

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...

Five Reasons Rider is Better than Visual Studio
11 Sept 2024 | original ↗

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...

The Single Best and Worst Things About Popular Programming Languages
11 Sept 2024 | original ↗

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...

HTTP Server Tutorial in Rust
23 Jul 2024 | original ↗

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...

Why GraphQL is Better Than Basic REST and SOAP APIs
4 Jun 2024 | original ↗

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...

Save KSP2 - An Open Letter to Take-Two and CEO Strauss Zelnick
1 Jun 2024 | original ↗

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...

Why is AI Such a Polarising Subject? Does it Change Everything? Or Nothing?
15 May 2024 | original ↗

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 is a Hypocrite - Helldivers 2 and Security
3 May 2024 | original ↗

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...

Stop Using string.ToLowerInvariant() to Compare Strings. InvariantCulture Comparisons are Slow
7 Mar 2024 | original ↗

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,...

Respecting the Clock: Unveiling the Time-Wasting Pitfalls in Professional Software Development
10 Jan 2024 | original ↗

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...

Why are Women so Underrepresented in Software Development?
30 Nov 2023 | original ↗

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...

Whats New in ML.NET 3.0
28 Nov 2023 | original ↗

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...

Mastering Backend Development in C#: 5 Essential Skills
24 Nov 2023 | original ↗

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...

.NET Chiseled Containers: A Revolution in Deployment Efficiency
21 Nov 2023 | original ↗

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...

Asynchronous Programming in C#: A Practical Guide
21 Nov 2023 | original ↗

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...

C# Design Patterns: A Practical Guide
20 Nov 2023 | original ↗

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...

Exploring What's New in C# 12
14 Nov 2023 | original ↗

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...

Optimizing SQL Queries in Entity Framework Core
12 Nov 2023 | original ↗

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...

The Dual Nature of Artificial Intelligence: Strengths and Limitations
11 Nov 2023 | original ↗

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...

From Chaos to Clarity: The Tale of PHP and .NET Naming
10 Nov 2023 | original ↗

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...

Why is AI So Bad at Financial Trading When Computers Are Just Better at Maths
9 Nov 2023 | original ↗

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,...

Solving Common Database Performance Bottlenecks
8 Nov 2023 | original ↗

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...

Mastering Git: Tips and Tricks for Version Control
7 Nov 2023 | original ↗

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 with C# and AI: A Practical Guide
6 Nov 2023 | original ↗

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...

Unleashing the Power of C#: Integrating AI for Intelligent Applications
5 Nov 2023 | original ↗

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...

Setting Up Bitlocker With SSD/NVME Hardware Encryption (it can be faster than no encryption at all)
24 Oct 2023 | original ↗

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...

Best Practices for Exception Handling in C#
18 Oct 2023 | original ↗

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...

Effective Code Reviews in a Development Team
17 Oct 2023 | original ↗

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...

Building a Cross-Platform Desktop App with .NET MAUI
16 Oct 2023 | original ↗

.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...

Efficient Debugging with Visual Studio
14 Oct 2023 | original ↗

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...

Unit Testing vs Manual Testing
13 Oct 2023 | original ↗

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:...

Essential Things Every Professional Software Developer Should Know
6 Oct 2023 | original ↗

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...

Comparing GraphQL and OData: Which is Best and When?
5 Oct 2023 | original ↗

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...

Why Your Language Choice Doesn't Matter as Good Programmer
3 Oct 2023 | original ↗

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...

Choosing the Right IDE: Visual Studio vs. JetBrains Rider
3 Oct 2023 | original ↗

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...

Embracing TypeScript: The Advantages Over Raw JavaScript
2 Oct 2023 | original ↗

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...

Evaluating Go: Why It Might Not Always Be a Suitable Replacement for C++
1 Oct 2023 | original ↗

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...

Debunking the Rust Hype: Why It's Not Always a Good Replacement for C++
30 Sept 2023 | original ↗

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...

Unraveling the Causes of Burnout in Software Developers and Strategies for Prevention
29 Sept 2023 | original ↗

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...

Embracing Efficiency: Shorter Work Hours for Software Developers (And everyone else)
28 Sept 2023 | original ↗

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...

Mental Health in Tech: Prioritizing Employee Wellbeing for Enhanced Productivity
27 Sept 2023 | original ↗

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...

Enhancing Unity Game Performance with Universal Render Pipeline (URP)
26 Sept 2023 | original ↗

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...

Feedback Culture: Constructive Criticism vs. Destructive Blame in Software Companies
25 Sept 2023 | original ↗

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...

What is the difference betwen Promises and Observables in angular?
24 Sept 2023 | original ↗

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...

Navigating Moral Dilemmas in Software Development
23 Sept 2023 | original ↗

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...

Securing ASP.NET Core Applications Against SQL Injection Attacks with Microsoft SQL Server
22 Sept 2023 | original ↗

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....

Understanding the Gap between Sales and Software Development in Software Companies
21 Sept 2023 | original ↗

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...

Working with Entity Framework Core in C#
21 Sept 2023 | original ↗

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...

Building Marlin 2.0.x Firmware for Ender 3 3D Printer and Ender 3 Clones
20 Sept 2023 | original ↗

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...

When Does Automating Away a Coworkers Job Cross The Line into Bullying
20 Sept 2023 | original ↗

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...

Time Series Anomaly Detection with ML.NET in C#
19 Sept 2023 | original ↗

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...

Company Culture: "No Blame" vs "Know Blame"
19 Sept 2023 | original ↗

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...

How a Zero Trust Policy Hampers Software Developer Productivity
18 Sept 2023 | original ↗

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...

The Pitfalls of Overmanaging Software Developers
15 Sept 2023 | original ↗

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...

Linus Tech Tips, Gamers Nexus, Ethics and Responsibility
15 Aug 2023 | original ↗

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...

5 Reasons C# Is Better Than Java
15 Aug 2023 | original ↗

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...

Yes You Can Block Elon Musk on Twitter
28 Jul 2023 | original ↗

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:

How to Become a Better Software Developer With These GitHub Repos
26 Jul 2023 | original ↗

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...

New and Interesting Features in C# 12
12 Jul 2023 | original ↗

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...

Creating Windows and Linux background services in dotnet 6.0/7.0
2 Jul 2023 | original ↗

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...

C# Basics: Generate Random Numbers
1 Jul 2023 | original ↗

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...

How To: Move Windows 11 Taskbar/Start Menu Back to the Left
30 Oct 2022 | original ↗

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”...

Native pico-sdk mpu6050 accelerometer and gyroscope library for Raspberry Pi Pico in C++
19 Sept 2022 | original ↗

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...

Native pico-sdk ILI9341/ILI9342 display drivere library for Raspberry Pi Pico in C++
19 Sept 2022 | original ↗

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...

Native pico-sdk BMP280 temperature sensor and air pressure sensor library for Raspberry Pi Pico in C++
18 Sept 2022 | original ↗

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...

C# Basics - Deep Copy Object Tree
1 Jul 2022 | original ↗

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...

C# Basics: Loop Through a Dictionary
27 Apr 2022 | original ↗

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...

C# Basics: What is the difference between 'string' and 'System.String'
27 Apr 2022 | original ↗

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:...

C Sharp 11 Raw String Literals
25 Apr 2022 | original ↗

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...

Why You Should Use Oauth OAuth 2.0 Tokens
14 Apr 2022 | original ↗

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...

Observe/React to Array Changes with Angular 12
11 Apr 2022 | original ↗

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...

uTP Micro Transport Protocol Documented
4 Oct 2021 | original ↗

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...

Building a site with Hugo, using GitHub, Amazon S3 and CloudFront with HTTPS and extensionless URLs
10 Mar 2021 | original ↗

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...

IMAP4 Client Protocol Library for C# and .NET
13 Jan 2021 | original ↗

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...

What's New and Interesting in .NET 5
15 Oct 2020 | original ↗

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...

C# Console Async Main - Async Entry Point for Console Apps
14 Oct 2020 | original ↗

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...

Problems With Copying a Stack in C# and How to Fix It
13 Oct 2020 | original ↗

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...

Simple C++ Neural Network Library
11 Oct 2020 | original ↗

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...

dotnet BitTorrent library written in C#
9 Oct 2020 | original ↗

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 ...

Creating Windows and Linux background services in dotnet core 3.0/3.1
30 Apr 2020 | original ↗

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...

dotnet Core and C# Dependency Injection
24 Apr 2020 | original ↗

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...

dotnet core 3.0 Self Contained Single Executable (and other build optimisations)
21 Apr 2020 | original ↗

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...

Adding appsettings.json options to a dotnet core console application
17 Nov 2019 | original ↗

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...

Microservices Introduction
12 Nov 2019 | original ↗

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...

Who should we blame?
18 Jan 2017 | original ↗

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...

The Battle for Proper Working Hours
9 Jan 2017 | original ↗

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...

The Pain of Developing a Xamarin App for OSX and iOS
9 Jan 2017 | original ↗

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...

739s
1 May 2012 | original ↗
733s
25 Apr 2012 | original ↗
725s
15 Aug 2011 | original ↗
629s
30 Nov 2010 | original ↗
624s
30 Nov 2010 | original ↗
↑ these items are from RSS. Visit the blog itself at https://www.darrenhorrocks.co.uk/ to find other articles and to appreciate the author's digital home.