Posts

Making all service APi's generic

 So, I was looking into an issue in which one our customer complaint about inconsistency of some of our interfaces. He specifically talked about status code of some of our API's and mentioned that some status codes are supported by some API's and not by others. What can I do to mitigate it? Improve up the documentation with details [asked by customer]. Look into the code: Code says that we are specifically handling this error (not found) and adding it inside the response. There might be some reason associated with it. How can I figure out the reasons? Check code commits Ask Product manager Some comments around that code Documentation of this feature or maybe issue fix for this bug  Asked for clarification from Product Manager let's see what happens.

Demystifying Error response

 So, I was looking into a bug in which my client was complaining that they are getting a generalized error message and specific message relating to that error was absent. So, I did an initial code analysis and found that the log was returned by us, but we are also sending using up an err message from backend and seems like that was coming to be as empty.  So, what can I do to mitigate it? I can raise it to my backend team. Check backends team code and figure out if something is going wrong during the parsing or mapping the response. Can something specific be added inside my code?? Things are breaking from backends' side so probably I might not be knowing the reason behind it. Unless I get it from backend. So, after going through the code investigating more, I found that point 2 was valid the issue was with parsing/mapping of response. So, I fixed it up and wrote verification test and raise a pull request.

Understanding VS code launch.json file

Image
 I have recently moved to other organization and here my team is extensively using VS code. So, I was assigned a task and after coding it up I was planning to test it. This is the button on which I clicked. Immediately after that, I start seeing a pop in which VS code asked me setup up a launch.json file in order run my tests. I was little bit confused about what exactly is this launch.json is and why it's needed? I did search for this, and this was the first article to which I found link:  Debugging in Visual Studio Code After reading it up a bit, I found that this is a configuration file needed for running up the tests and currently in my code I haven't configured it. Upon reading more I found that vs code does provide options to run current file but it's better to create a launch.json file to save and configure testing details . Info: This launch.json file would be created under .vscode folder. There are quite a lot of launch.json attributes which can be used based upon...

Kustov query language

Image
 In this post I would be talking about my experiences of learning KQL (Kustov query language). I started with this document  Kusto Query Language (KQL) overview | Kusto . From the documentation I get to know that it's a query language used for analytics purposes and uses up schema entities quite similar to SQL i.e., having database, tables, column. Then, document further talks about Kusto query which is basically a read only query for processing data. Types of querying: KQL supports 3 types of query statements. These are basically Let, Set, Tabular. Tabular: This is the most common way of querying. In this format a table is provided as an input and table is also taken up as output. Query consists of lot of operands which are connected by pipe (|). I know it's too much but let's take a look at a query and this would be crystal clear.  In this query we can see StormEvents is provided as input and then there are lot of operands which are connected using pipe (|). These pip...

Finding something inside windows

 got an error while running azure-js-sdk package: : File C:\Users\<path>\AppData\Roaming\npm\rush.ps1 cannot be loaded. The file C:\Users\<path>\AppData\Roaming found it's solution also in one of the post:  [Solved] AppData\Roaming\npm\ng.ps1 cannot be loaded because running scripts is disabled on this system (techstrology.com) it says about deleting rush.ps1 file but i wasn't able to find it's parent folder. Later I found that this inside an hidden folder, this article helped in fixing the issue: How to Find and Use the AppData Folder in Windows (lifewire.com)

Using Azure Cosmos DB JavaScript sdk

Image
  Azure cosmos DB  is Microsoft's proprietary globally distributed, multi-model database service "for managing data at planet-scale" launched in May 2017. [1]  It is schema-agnostic, horizontally scalable, and generally classified as a  NoSQL  database. We have discussed about setting up a cosmos DB client from Azure CLI in our last post:  https://thenoobsoftwareengineerblog.blogspot.com/2022/09/setting-up-cosmos-db.html In this post we would discuss about setting up database using one of their most popular sdk which is Java script one. Let's start with it, upon searching google this is the first link which comes up: Azure Cosmos DB client library for JavaScript | Microsoft Learn This is from the Microsoft (creator of cosmos DB) and by going through it i found it to be quite useful document. Let me follow it for connecting it my account which I created in my last post. Or maybe before that let's try creating a Database and container associated.  This d...

Setting up Azure Cosmos DB

Image
 Ok, let's take it one by one. Let's start with setting up of a cosmos DB cluster. But before that lets discuss some general info about cosmos db.  What is cosmos DB? If you search Wikipedia, you will get following result. Azure Cosmos DB  is Microsoft's proprietary globally distributed, multi-model database service "for managing data at planet-scale" launched in May 2017. [1]  It is schema-agnostic, horizontally scalable, and generally classified as a  NoSQL  database. So, I can understand that it's a Microsoft provided NoSQL datastore which provides different properties as mentioned in its description. I am not going into the details of these properties in this article as it's beyond the scope of it. I would only discuss about how to set it up. Now, let's jump on to the setup of cosmos DB. How to setup cosmos DB?  In order to do it, you need an azure account. In order to create a free one, you can use:  Create Your Azure Free Account Today | Mic...