Posts
Alen's Devnotes
Cancel

Go or Golang is a strongly typed language. So, basically the compiler needs to know what kind of data type it is dealing with. There are 3 ways of declaring a variable. 1. var i int Here i is...

Since Golang does not support classes, the concept of inheritance is achieved using interfaces and structs. Then again, structs cannot directly extend from interfaces or other structs. So, one coul...

Disclaimer: The below writeup is based on my readings and experience and do not in any way reflect the opinions of my past or present employer[s] I recently joined Google as a Software Engineer. E...

Previously, I wrote about having developed and deployed a web app to generate GUID using Blazor and deployed using Azure Static Web App. I came across this challenge of wanting to invoke a Javascr...

As a developer, I often come across the need to generate GUID to use at random places. I always jump online, search for “generate guid online”, click on a link, wait for it to load… you know the dr...

What if you want to skip Top N rows while doing a select statement in sql server? Try this DECLARE @count INT = 5 SELECT * FROM <<Table>> WHERE <condition> ORDER BY <<colu...

Selecting Top 10 rows is easy. Just do SELECT TOP 10 * FROM PERSON But what if the number of rows you want to get is dynamic? What if you have a variable N for the number of rows to return? Try t...

The ?? operator is called null-coalescing operator. This operator is used to provide a default value if the value of the operand on the left-hand side of the operator is null. The usage is as fol...

​ Today, I fumbled upon an interesting issue. Validating model/contract (ModelState validation) for an Asp.Net Core application using unit test. Consider a model class as below: ​ public class U...

I have been hosting my blog using wordpress for the past 1 year. Wordpress, although is easy to use, is quite heavy and was too much work for me. I wanted to write my posts as markdown files (whic...