Mitesh Shah's Blog

The different kinds of Unit Tests

In my previous post, I talked about various kinds of Tests. As a developer working for a mature codebase, the most common tests that you will need to write are Unit Tests, and its a good practice tbh. While working on my team’s project (which was in a fairly early stage), I saw various kinds of Unit Tests and researched a bit myself on how to write some good UTs. Today I plan to share the same in this post.

A Primer on Different Kinds of Tests

I haven’t been a developer for too long (yet) to justify or even explain the importance of well written tests, especially in your CI system, but over my experience in recent times, I have seen great tests helping me catch a lot of future headaches. That being said, while developing a service end-to-end, I got to see the different kinds of tests and testing strategies and I thought why not “blog my journey” on testing.

C# Properties and their different Uses

I learnt C# in parts from various resources, mostly because each one had their different starting points. One book heavily relied on using Visual Studio which definitely makes life easy, but makes you ignore the nitties-gritties of setting up .NET projects, while one did everything from scratch, which did scratch my itch (Get it? 😜) but had a really really slow pace. One constructs that I learnt about while seeing how to create classes was C# Properties.

Conditional Probability and Families

So I was reading the book “Data Science from Scratch” by Joel Grus. I came across this nice tricky problem in Conditional Probability mentioned in this book. Let’s take a look A Quick Refresher on Conditional Probability Well if you forgot the definition of conditional probability, here is a small refresher for you. Say there are two events E and F. The probability that E happens given that we know F happens is represented using P(E|F).

Constructing a complex dictionary of base and derived class using the same code

Okay, really complex title aside, I’ll try to explain the problem I had and the interesting way I found to solve it. This may not be the best or the most optimized way, but I really liked this solution and would like to share it. Also, although I do prefer Python, this post is in C#, since that was the language I encountered this problem in. So here is the problem.

Welcome to this Blog

Hey everyone, welcome to my blog. I finally took the leap and set up my blog, and after a lot of thinking, I finally decided to create a blog. Why a blog? Well among a lot of other reasons, like not forgetting what I learn from time to time, and to keep track of my journey as a Software Development Engineer. The other huge reason is that I love to learn new things, research the ones I find interesting, and I plan to document and share my learnings via blog posts, which can be easily found and referred to later as well.