Posts

Showing posts from December, 2020

Auto Mapper and Record Types - will they blend?

Image
TL;DR: Yes, they will. Thank you for your time. 😄 Background At Redgate, engineers enjoy a great benefit in that we get are expected to spend 10% of our time to improve on our craft.  Having suffered this week with manually having to copy a bunch of properties from a domain object to its HTTP representation, I decided to spend this week's 10% time to see if I could answer the following questions: Can use AutoMapper to simplify mapping between two types?  Does it also allow me to map between a regular type and a record type? What about the other way around? Can I use this to reduce the maintenance burden in my product? Mapping between two types [automapper fundamentals] To started and get a basic mapping done, created a .NET 5 ASP.NET Web API project, added the below package references and configured automapper : < PackageReference Include ="AutoMapper" Version ="10.1.1" /> < PackageReference Include ="AutoMapper.Extensions.Microsoft.DependencyInj

Three random quotes and a tool

Image
Here are some random quotes I've come across recently and that I need to get off my post-its and into a digital format for prosperity ;) Experts don't follow rules. Rules are there to turn beginners into experts. Is this uncomfortable because it's new, or because I'm doing it wrong? A { Strategy | Project } is a { a process | a workflow } (that is, a collection of small steps) towards a big { Goal | Vision } Oh, here's a tool that I came across to aid in systems thinking!

What are some developer tools (or apps) worth spending money on?

Working for a tooling company at the moment, I am intrigued to learn about which tools and apps are non-negotiable - that you need - to do your work. Some apps comes to mind immediately, being Resharper / Rider SQL Prompt Which tools have you bought for yourself? If you had to,  which ones would you? Which tools do you try to get your company to purchase to make your life as a developer easier? Further, are there tools/apps that you have spent money on in your private life that have markedly made your life better/easier? Personally, I can't recommend YouTube Premium/Red enough, thinking its great value with its automatic save of your Watch Later clips to your tablet, automatic downloading of an offline music playlist to your phone ... very handy!

How an ADR saved the day!

Image
One of the principles we adhere to at my current company, is to write down Architectural Decision Records whenever we make a "larger decision". Recently, having such a record, came in super handy, as we were trying to resolve a licensing issue wherein our library was called from a .NET Core application through a .NET Framework, using a custom communication protocol. It was all very ... convoluted and - more importantly - didn't do what it was supposed to. The fact that no-one from the original team was still with us, didn't make things easier! After tearing our hairs out for quite a while, one of the team members offhandedly asked "shouldn't there be an ADR for this?", prompting us to look into the shared repository. There was! And right in it, it said: Once ************* .Client  starts supporting .NET Standard consumers, we can remove this workaround and fetch the license status from ******** directly. Much easier! Now we could remove a lot of very in