Posts

Showing posts from March, 2020
GitHub Copilot Customization Explained for Beginners: Instructions, Prompt Files, Skills, Agents, and Hooks  Introduction If you've recently started using GitHub Copilot, you've probably come across terms like Instructions , Prompt Files , Skills , Agents , and Hooks . At first glance, they all seem to do the same thing—they tell Copilot what to do. So why does GitHub have five different customization features? The answer is simple: each feature solves a different problem. Think of GitHub Copilot as a new developer joining your team. On their first day, you don't just hand them code. You explain your coding standards, give them reusable templates, teach them specialized knowledge, assign them a role, and automate repetitive tasks. That's exactly how GitHub Copilot customization works. In this article, you'll learn what each feature does, when to use it, and how they all work together. By the end, you'll know which feature to start with and which ones can wait un...

PostgreSQL extension for Azure Data Studio

Image
Azure Data Studio is a cross-platform modern editor focused on data development. It's available for Linux, MacOS, and Windows. Azure Data Studio inherits a lot of VS Code functionality. It supports most of VS Code's extensions like Python, R, and Kubernetes support. You can manage multiple database connections, explore database object hierarchy, set up database dashboards, Integrated Terminal (e.g. Bash, PowerShell, sqlcmd, ssh) etc. Most importantly it enhances developers day to day productivity. Pre requisites Download and Install Azure Data Studio We can extend the functionality of Azure Data Studio using extensions.We can connect to PostgreSQL using extension and query database using the Intellisense query editor. Navigate to the market place and search for Postgresql: Click on Install, it downloads the required package and installs it. Note: When I tried to install PostgreSQL on Azure Data Studio version 1.13.0 it didn't load properly later I updated to...

Error Handling in .NET Core

Exception handling is one of the most important features of any application. To handle exceptions, we can use Try-Catch block in our code base. If we want to extract all the exception handling in one location .NET core provides Exception handler/middleware. This article will refer to the following sample code on GitHub: https://tinyurl.com/sqx65mn Exceptions with Try-Catch-Finally The simplest form of a try-catch block  try {    // try something here } catch (Exception ex) {   // catch an exception here }  finally {    // always run this code } You can have multiple catch blocks to handle specific exceptions like ArgumentOutOfRangeException, NullReferenceException etc. Finally block is optional, whether or not an exception has occurred, the finally block will always be executed. Generally different approach is followed for error handling for front end application (using MVC, Razor) vs WebAPI. Error handli...