Quantcast
Channel: Muhammad Rehan Saeed
Browsing latest articles
Browse All 138 View Live
↧

Image may be NSFW.
Clik here to view.

Cross-Platform DevOps for .NET Core

If you're a library author or writing a cross-platform application then .NET Core is great but it throws up the question, how do you test that your code works on all operating systems? Well the answer...

View Article


Image may be NSFW.
Clik here to view.

Cleaning Up CSPROJ

::: tip TLDR I show how to make csproj XML concise and pretty for hand editing. ::: I used project.json since Beta 7 and got used to hand editing it, I've continues that practice with .csproj files and...

View Article


dotnet new Feature Selection

Part 1 - Custom Project Templates Using dotnet new Part 2 - dotnet new Feature Selection Part 3 - Unit Testing dotnet new Templates In my last post I showed how to get started with using dotnet new to...

View Article

ASP.NET Core Lazy Command Pattern

::: tip TLDR Move your ASP.NET Core MVC action method logic into lazily loaded commands using the command pattern. ::: When writing your Controllers in ASP.NET Core, you can end up with a very long...

View Article

Image may be NSFW.
Clik here to view.

Structured Data using Schema.NET

What is Schema.org? Schema.org defines a set of standard classes and their properties for objects and services in the real world. There are nearly 700 classes at the time of writing defined by...

View Article


Keeping Up With Software Development

Keeping up with the changes in the software development industry always feels like a losing battle. Just when I feel like I've started to catch up and learn the things I need to know to do my job (and...

View Article

A Very Generic .editorconfig File (Updated)

What is a .editorconfig File? A .editorconfig file helps developers define and maintain consistent coding styles between different editors and IDEs for file with different file extensions. These...

View Article

ASP.NET Core Caching in Practice

Cache-Control HTTP Header The Cache-Control HTTP header can be used to set how long your resource can be cached for. However, the problem with this HTTP header is that you need to be able to predict...

View Article


Docker Read-Only File Systems

For a little bit of added security you can make the file system of your container read-only, excluding any volumes you may have created. If anyone hacks into your container, they will be unable to...

View Article


Docker Labels in Depth

Static Docker Labels Docker image names are short and usually not very descriptive. You have the ability to label your Docker images to give them some extra metadata. You can add any information you...

View Article

Image may be NSFW.
Clik here to view.

Useful Docker Images - Part 1

Useful Docker Images - Part 1 - Administering Docker Useful Docker Images - Part 2 - The EKL-B Stack I have been running Docker Swarm in production for a few API's and single page applications for a...

View Article

Image may be NSFW.
Clik here to view.

Useful Docker Images - Part 2

Useful Docker Images - Part 1 - Administering Docker Useful Docker Images - Part 2 - The EKL-B Stack Filebeat, Metricbeat & Hearbeat Knowing what is happening in Docker and in your applications...

View Article

Writing your Webpack configuration in TypeScript

Webpack Configuration is a Mess ::: warning Before you get the wrong idea, let me say that Webpack is a super powerful, it's what you probably should be using these days to deal with static assets and...

View Article


Writing Code while Asleep

This is a quick post about something I tend to do quite often that has really helped me be more productive and I think has helped the wider developer community in some small way too. It's something...

View Article

Image may be NSFW.
Clik here to view.

The Dotnet Watch Tool Revisited

I talked about using the dotnet watch tool with Visual Studio some time ago. Since then, a lot changed with the Visual Studio tooling and .NET Core 2.0 which broke the use of dotnet watch in Visual...

View Article


Image may be NSFW.
Clik here to view.

.NET Boxed

.NET Boxed is a set of project templates with batteries included, providing the minimum amount of code required to get you going faster. Right now it includes API and GraphQL project templates. ASP.NET...

View Article

Migrating to Entity Framework Core Seed Data

I was already using Entity Framework Core 2.0 and had written some custom code to enter some static seed data to certain tables. Entity Framework 2.1 added support for data seeding which manages your...

View Article


Optimally Configuring Entity Framework Core

Lets talk about configuring your Entity Framework Core DbContext for a moment. There are several options you might want to consider turning on. This is how I configure mine in most micro services:...

View Article

ASP.NET Core Hidden Gem - QueryHelpers

I discovered a hidden gem in ASP.NET Core a couple of weeks ago that can help to build up and parse URL's called QueryHelpers. Here's how you can use it to build a URL using the AddQueryString method:...

View Article

Optimally Configuring ASP.NET Core HttpClientFactory

::: warning Update (20 August 2018) Steve Gordon kindly suggested a further optimisation to use ConfigureHttpClient. I've updated the code below to reflect this. ::: In this post, I'm going to show how...

View Article

PluralSight vs LinkedIn Learning vs FrontendMasters vs Egghead.io vs YouTube

I use a lot of video resources to keep up to date with .NET, JavaScript and other tech like Docker, Kubernetes etc. I've compiled here a list of these resources and my impressions of using them and...

View Article


Is ASP.NET Core now a Mature Platform?

::: tip Update (12 January 2019) It seems that Damian Edwards (The ASP.NET Core Project Manager) likes this post and agrees with the points I've made! It's great to hear that he's is in alignment with...

View Article


Image may be NSFW.
Clik here to view.

A Simple and Fast Object Mapper

I have a confession to make...I don't use Automapper. For those who don't know Automapper is the number one object to object mapper library on NuGet by far. It takes properties from one object and...

View Article

Securing ASP.NET Core in Docker

Some time ago, I blogged about how you can get some extra security when running Docker containers by making their file systems read-only. This ensures that should an attacker get into the container...

View Article

Git Cloning the Windows OS Repo

::: warning Disclaimer I'm a Microsoft employee but my opinions in this personal blog post are my own and nothing to do with Microsoft. The information in this blog post is already publicly available...

View Article


.gitattributes Best Practices

.gitignore If you've messed with Git for long enough, you're aware that you can use the .gitignore file to exclude files from being checked into your repository. There is even a whole GitHub repository...

View Article

Unit Testing dotnet new Templates

Part 1 - Custom Project Templates Using dotnet new Part 2 - dotnet new Feature Selection Part 3 - Unit Testing dotnet new Templates As I talked about in my previous post some time ago about dotnet new...

View Article

Image may be NSFW.
Clik here to view.

What dotnet new Could Be

The 'dotnet new' CLI command is a great way to create projects from templates in dotnet. However, I think it could provide a much better experience than it currently does. I also suspect it isn't used...

View Article

ASP.NET Core Integration Testing & Mocking using Moq

If you want to run an integration test for your ASP.NET Core app without also testing lots of external dependencies like databases and the like, then the lengthy official 'Integration tests in ASP.NET...

View Article



Choosing a Static Site Generator

I recently rebuilt this blog using a static site generator called Gridsome which is based on Vue.js and GraphQL. This is the story of all the static site generators I tried or read up on, how I moved...

View Article

Image may be NSFW.
Clik here to view.

Spicing up your Browser Console

Wouldn't it be cool if when you opened the browser console up on a site, you saw a cool secret message? There are many sites that do this with quite a few business's advertising frontend development...

View Article

Image may be NSFW.
Clik here to view.

Racism in Software Development & Beyond

If you're of North African, Middle Eastern or South Asian origin, you have to send send up to 90% more job applications than your white counterparts in the United Kingdom. This level of discrimination...

View Article

Image may be NSFW.
Clik here to view.

The Easiest Way to Version NuGet Packages

The easiest way to version NuGet packages using semantic versioning in my opinion is to use MinVer. Getting started is literally as easy as adding the MinVer NuGet package. Getting finished is not too...

View Article


Image may be NSFW.
Clik here to view.

The Fastest NuGet Package Ever Published (Probably)

::: tip Updated 2020-07-08 12:16 I forgot to mention how we can use labels to help automatically draft release notes, so I've updated the post with a few extra screenshots and descriptions. ::: So, you...

View Article

Automating .NET Security Updates

Every few weeks Microsoft pushes out a .NET SDK update to patch zero day security vulnerabilities. It's important to keep up to date with these to ensure that your software is protected. The problem...

View Article

Muhammad Rehan Saeed: Developer at Microsoft | Leonardo Tuna Podcast

I did a fun podcast episode with Leonardo Tuna. We talked about the difficulty of getting a job at Microsoft, some of my work there, JavaScript frontend frameworks, Vue vs React and my interesting...

View Article


Image may be NSFW.
Clik here to view.

Deep Dive into Open Telemetry for .NET

Open Telemetry - Deep Dive into Open Telemetry for .NET Open Telemetry - Optimally Configuring Open Telemetry for ASP.NET Core Open Telemetry is an open source specification, tools and SDK's used to...

View Article


Open Telemetry for ASP.NET Core

Open Telemetry - Deep Dive into Open Telemetry for .NET Open Telemetry - Configuring Open Telemetry for ASP.NET Core Open Telemetry - Exporting Open Telemetry Data to Jaeger Open Telemetry - Optimally...

View Article

Image may be NSFW.
Clik here to view.

Exporting Open Telemetry Data to Jaeger

Open Telemetry - Deep Dive into Open Telemetry for .NET Open Telemetry - Configuring Open Telemetry for ASP.NET Core Open Telemetry - Exporting Open Telemetry Data to Jaeger Open Telemetry - Optimally...

View Article

A System for Grouping & Sorting CSS Properties

There are no hard and fast rules for code style and as I've written about before it can get ugly when people have various opposing opinions on the subject. In CSS, which I'm quite fond of writing, I...

View Article

CSS General Rules of Thumb

Learning CSS is difficult and as someone who has tried to teach CSS others, it's also difficult to point to good teaching resources. There isn't a simple video course I can point to and say "go and...

View Article


Web Component Custom Element Gotchas

::: tip Update (04 May 2021) Chris Holt from the FAST UI team at Microsoft got in touch with me with an alternative workaround to using a wrapper element when required to use a semantic HTML element...

View Article

Image may be NSFW.
Clik here to view.

Code Coverage & Frontend Testing

I was recently asked an interesting question about unit test code coverage and frontend testing by a colleague: Policies describe 80% plus unit test coverage and our React devs are pushing back a lot,...

View Article


Image may be NSFW.
Clik here to view.

.NET Boxed Visual Studio Integration

A few weeks ago Scott Hanselman blogged about creating dotnet new based projects directly from Visual Studio. Unfortunately, at that time Visual Studio 16.9 didn't properly support full solution...

View Article

The Windows Package Manager

Winget is a package manager for Windows a bit like apt for linux or the open source Chocolatey for Windows. Version 1.1 of the Windows Package Manager (winget) was recently released. I've had my eye on...

View Article


The Problem with C# 10 Implicit Usings

::: tip Update (2021-10-14) Mark Rendle made an interesting suggestion on Twitter after seeing this blog post. I've updated the post below with his code. ::: Yesterday I livestreamed myself upgrading a...

View Article

Optimally Configuring Open Telemetry Tracing for ASP.NET Core

Open Telemetry - Deep Dive into Open Telemetry for .NET Open Telemetry - Configuring Open Telemetry for ASP.NET Core Open Telemetry - Exporting Open Telemetry Data to Jaeger Open Telemetry - Optimally...

View Article

Live Streaming .NET

I started live streaming my software development learnings simultaneously on YouTube and Twitch a few months ago. I'm by no means a professional and only have a couple hundred subscribers and a few...

View Article

Image may be NSFW.
Clik here to view.

I Was Awarded as an Open UK Honouree

Generally speaking I'm not the sort of person who generally receives awards or prizes, so I was rather surprised when out of the blue I was contacted by Open UK to receive a medal to signify being...

View Article


On the Etiquette of Pull Request Comments

Picture the scene. A hard working newbie developer is mashing their keyboard for hours trying to get something working smoothly. Eventually, perseverance and maybe more than a little help from...

View Article

Browsing latest articles
Browse All 138 View Live