Posts

8 Data Structures Every Programmer Should Know

Image
Here’s a summary for each of the eight data structures, including their definition, functionality, types, operations with C# code snippets, characteristics, issues, and use cases: 1. Array Definition : A collection of elements identified by index or key, stored in contiguous memory locations. Functionality : Provides fast access to elements using indices. Types : Single-dimensional, multi-dimensional, jagged arrays. Operations : Characteristics : Fixed size, efficient index-based access. Issues : Inflexible size, costly insertions/deletions. Use Case : Suitable for scenarios where the size is known and constant, like storing a fixed number of items. 2. Linked List Definition : A linear collection of nodes, where each node points to the next node. Functionality : Allows dynamic memory allocation and efficient insertions/deletions. Types : Singly linked list, doubly linked list, circular linked list. Operations : Characteristics : Dynamic size, sequential access. Issues...

When to use private constructors?

Image
Private constructors in C# are used in several scenarios to control how instances of a class are created. Here are some common use cases: 1. Singleton Pattern : Ensures that a class has only one instance and provides a global point of access to it. The private constructor prevents other classes from creating new instances. 2. Static Classes : When a class contains only static members, a private constructor prevents instantiation of the class. 3. Factory Methods : When you want to control the creation of instances through factory methods rather than direct instantiation. 4. Restricting Instantiation : To prevent instantiation of a class from outside the class itself, ensuring that objects are only created in a controlled manner.

Free Cloud Computing Resources for Students: Unlock Your Potential in the Cloud

As a student venturing into the world of cloud computing, you're in luck! There's a wealth of free resources available to help you gain hands-on experience without breaking the bank. Let's explore some of the best options out there. AWS: Your Gateway to Cloud Mastery Amazon Web Services (AWS) offers two fantastic programs for students: 1. AWS Free Tier : Available to all new AWS customers, this provides 12 months of free access to various AWS services, including:     - 750 hours/month of EC2 instances     - 5 GB of S3 storage     - 750 hours/month of RDS database usage 2.  AWS Educate : Designed specifically for students, this program offers:     - Free access to AWS services (no credit card required)     - Self-paced labs and courses     - A job board for cloud-related opportunities Note: To get started with AWS Educate, simply visit their website and register with your student email. Beyond AWS: Exploring Other Cloud Pla...

Runnig AWS Services on LocalStack - Docker

In this video I will show how to run AWS services locally on your development system using Docker. To get started, you need to install Docker Desktop on your Windows system.  Once Docker is installed, you can create a new directory on your local system and clone or download the localstack repository. The repository contains a docker-compose.yml file that defines the services you want to run locally. You can modify this file to specify the services you need and the ports they will listen on.  Once you have the docker-compose.yml file, you can run the docker-compose up command to start the services.  This will create and run Docker containers for each service.  You can then access the services using their respective endpoints. Here is the video: Running AWS Services on LocalStack - Docker I hope this is helpful! Let me know if you have any other questions in comments section below.

Code Churn using Git - Find the files changed between two commits

When we want to know all the changes that happened between two commits, or from date A to Date B. We can get the details by querying the git repository through Terminal. Here is the command for finding all the files changed between two commits. git diff --stat <Commit ID 1> <Commit ID 2> Commit ID 1 is start check in. Commit ID 2 is end check in. The results will show all the files changed between these two commits. Reject local commits and reset the local brnch to the remote/origin/master branch state git fetch origin git reset --hard origin/master Reject local commits and reset the local brnch to the remote/feature branch state git fetch origin git reset --hard origin/feature/STORY-###-BranchName Creating stash from one Branch and applying to another branch Make change on Branch 1, Stash it from Branch 1. Now check out Branch 2. Go to terminal and Run git stash pop Code Churn Steps ##Find the commit ids for periods git log --since="20...