All posts by Ankur

A Tale of a New Developer and Git 💻🚀

Alex, a bright-eyed new developer, was eager to dive into his first open-source project 🚀. The project’s code was hosted on a remote repository, and Alex’s first task was to get a local copy. He opened his terminal and typed:

git clone https://github.com/open-source-project/awesome-project.git

This command, git clone, fetched the entire repository from GitHub and created a local copy on his machine. 🌎

Now, Alex was ready to start contributing. He began by creating a new branch for his feature: 🌳

git checkout -b new-feature
Continue reading A Tale of a New Developer and Git 💻🚀

Understanding DW and DB in 8086 Assembly

In the realm of 8086 assembly language, understanding the nuances of data declaration is crucial. Two fundamental directives, DW (Define Word) and DB (Define Byte), play pivotal roles in allocating memory and storing data.


DW (Define Word)

  • Memory Allocation: Reserves 2 bytes (16 bits) of memory for the specified data.
  • Data Storage: Stores a 16-bit integer value.
  • Usage: Ideal for larger numerical values, addresses, or any data that requires 16 bits of representation.

Example:

data segment
    number DW 0x1234  ; Allocates 2 bytes and stores 1234h (4660 decimal)
data ends
Continue reading Understanding DW and DB in 8086 Assembly

🔗 Java Interview Preparation Guide

Welcome to the Java Interview Preparation Guide! This guide is designed to help you prepare for your upcoming Java programming interviews. In this guide, you will find a collection of important Java programming topics that will help you ace your next interview. Whether you are a seasoned Java developer or a beginner, this guide has something for you. Let’s get started!

Continue reading 🔗 Java Interview Preparation Guide

Overview of New Features in Java 19

Java 19 is the latest version of the Java programming language. It was released on September 20, 2022, and it comes with numerous new features and improvements. Some of the most notable changes in Java 19 include the introduction of pattern matching for switch statements, the enhanced packaging tool, the removal of the volatile keyword from most fields in the java.util.concurrent package, and the introduction of new APIs for regular expressions, among many others.

You can download Java 19 here.


New in Java 19:

GIT ADD . (ALL)

git add . is a Git command used to stage all changes made to a working directory, before committing them.

Here is an example:

Suppose you made changes to two files named file1.txt and file2.txt. You want to include both changes in your next commit.
To do so, first navigate to the project directory in the terminal and execute:

git add .

This command stages all of the changes made in repository. You can now review the changes staged by executing:

git status

You should see that file1.txt and file2.txt have been staged.
Now you can commit the staged changes by running:

git commit -m "Added new feature to file1.txt"

The commit will include all changes.

GIT PUSH

git push is a Git command used to upload your local commits to a remote repository. It is used to push changes made to your local repository to a remote repository and update the remote repository’s branch with your local changes. Here is an example:

Let’s say you have made some changes to a local repository and committed those changes. Now, you want to push those changes to a remote repository on GitHub.

First, you need to add a remote repository to your local repository by using the command git remote add origin [remote repository URL].

Once you have added a remote repository, you can push your changes by running the command git push origin [branch name]. For example, if you want to push your changes to the master branch, you will run the command.

git push origin master

or simply

git push

This will upload your local changes to the remote repository’s master branch, making them available to others who are collaborating on the project.

GIT PULL

git pull is a command in Git that fetches and merges changes from a remote repository to your local repository. This command is handy when working in a team that pushes code to a remote repository frequently.

Here’s an example:
Let’s say there are two branches in the remote repository main and feature. Your local repository is currently on the main branch. To update your local repository with the changes from the feature branch of the remote repository, you can use the following command:

git pull origin feature

This command will fetch changes from the feature branch of the remote repository origin and merge them into your local repository. If there are any conflicts between the changes in the remote repository and your local repository, you’ll need to resolve these conflicts before you can push your changes back to the remote repository.