<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Debug School: Fahad Rehman</title>
    <description>The latest articles on Debug School by Fahad Rehman (@fahadrehman23).</description>
    <link>https://www.debug.school/fahadrehman23</link>
    <image>
      <url>https://www.debug.school/images/lQjv2DkmwEhWj0uIAQsqZYT7hSNbysiaOXFEdj3h6LI/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvdXNl/ci9wcm9maWxlX2lt/YWdlLzMyOS9iNjM5/OWQ1Yy02OWUxLTRl/N2YtOTkwNC0wOTM2/YWEzY2Q1ODgucG5n</url>
      <title>Debug School: Fahad Rehman</title>
      <link>https://www.debug.school/fahadrehman23</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/fahadrehman23"/>
    <language>en</language>
    <item>
      <title>SonarQube Assignment</title>
      <dc:creator>Fahad Rehman</dc:creator>
      <pubDate>Fri, 03 Mar 2023 03:55:55 +0000</pubDate>
      <link>https://www.debug.school/fahadrehman23/sonarqube-assignment-91n</link>
      <guid>https://www.debug.school/fahadrehman23/sonarqube-assignment-91n</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;What is SonarQube and what is it used for in software development?&lt;br&gt;
SonarQube is an open-source platform used for continuous code quality inspection and static code analysis in software development. It provides a centralized location for managing code quality and security, making it easier for developers to identify and fix issues early in the development process.SonarQube helps developers identify and fix issues in their code, resulting in higher-quality software that is easier to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How does SonarQube integrate with the software development process?&lt;br&gt;
SonarQube integrates with the software development process by providing a range of plugins and integrations that allow it to work with a variety of development tools and build systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain the importance of code quality and how SonarQube can help improve it.&lt;br&gt;
Code quality is an important aspect of software development as it directly impacts the functionality, reliability, and maintainability of software products.SonarQube can help improve code quality by providing automated code analysis and continuous feedback on code quality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Discuss the different types of code analysis that SonarQube can perform, such as static code analysis, complexity analysis, and security analysis&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Static code analysis: SonarQube can perform static code analysis to identify issues like code smells, coding standards violations, and potential bugs. It can analyze the code without executing it, making it a quick and effective way to find issues early in the development process.&lt;br&gt;
Complexity analysis: SonarQube can analyze code complexity and identify areas that may be difficult to understand or maintain. It can identify code that has a high cyclomatic complexity or code that has too many nested loops or conditional statements.&lt;br&gt;
Security analysis: SonarQube can perform security analysis to identify potential security vulnerabilities in the code. It can identify issues like SQL injection, cross-site scripting (XSS), and access control vulnerabilities. This type of analysis can help developers ensure that their code is secure and not susceptible to attacks.&lt;/p&gt;

&lt;p&gt;5.How does SonarQube measure code quality and generate reports?&lt;br&gt;
SonarQube measures code quality by analyzing the source code and identifying potential issues that may impact its reliability, maintainability, and security.&lt;/p&gt;

&lt;p&gt;6.What are the key features of SonarQube, such as code duplication detection, style and syntax checking, and technical debt management?&lt;br&gt;
Code duplication detection: SonarQube can detect code that has been copied and pasted in multiple places throughout the codebase, which can lead to maintenance issues and potential bugs.&lt;br&gt;
Style and syntax checking: SonarQube can check the code against coding standards and best practices, ensuring that the code is consistent and easy to read.&lt;br&gt;
Technical debt management: SonarQube can calculate technical debt, which is the cost of fixing the issues that are identified during code analysis. This allows developers to prioritize the most critical issues and plan for future improvements.&lt;/p&gt;

&lt;p&gt;7.How does SonarQube handle issue tracking and resolution?&lt;br&gt;
SonarQube allows developers to track issues, including bugs, vulnerabilities, and code smells in real-time. The tool provides detailed information on each issue including the type severity location in the code and potential impact.&lt;/p&gt;

&lt;p&gt;8.Discuss the different types of plugins available for SonarQube and how they can be used to extend its functionality.&lt;/p&gt;

&lt;p&gt;Language plugins: SonarQube supports a wide range of programming languages, including Java, JavaScript,Python,C#, and many more. Language plugins provide additional rules and metrics that are specific to the language being used.&lt;br&gt;
SCM plugins: SonarQube integrates with popular source code management (SCM) systems like Git, SVN, and Mercurial. SCM plugins allow SonarQube to track changes to code over time and provide detailed analysis of code quality trends.&lt;br&gt;
Issue tracker plugins: SonarQube integrates with popular issue tracking systems like Jira,GitHub,and GitLab. Issue tracker plugins allow SonarQube to automatically create issues and track them within the context of a larger development workflow.&lt;/p&gt;

&lt;p&gt;9.Explain the importance of code coverage and how SonarQube can help measure and report on it.&lt;/p&gt;

&lt;p&gt;Code coverage is a measure of the extent to which the source code of a software system has been tested it indicates how much of the code is being exercised by tests and can help identify areas of the code that may be prone to errors or bugs. SonarQube can help measure and report on code coverage in several ways. First it can integrate with a wide range of testing frameworks, including JUnit, TestNG, and NUnit, to collect coverage data during testing. This data can then be used to generate detailed reports on code coverage&lt;/p&gt;

&lt;p&gt;10.Discuss the process of setting up a SonarQube project and configuring it to meet your team’s specific needs.&lt;/p&gt;

&lt;p&gt;Setting up a SonarQube project and configuring it to meet your team's specific needs can be broken down into several steps:&lt;/p&gt;

&lt;p&gt;Install and configure SonarQube&lt;br&gt;
Create a new project&lt;br&gt;
Configure the project settings&lt;br&gt;
Set up analysis tools&lt;br&gt;
Run a code analysis&lt;br&gt;
Review the results&lt;br&gt;
Iterate and improve&lt;/p&gt;

&lt;p&gt;11.How does SonarQube integrate with popular continuous integration (CI) and continuous delivery (CD) tools such as Jenkins and Travis CI?&lt;br&gt;
SonarQube has a plugin for Jenkins that allows developers to easily integrate SonarQube into their Jenkins pipelines. This plugin can be used to run code analysis on every build, as well as to fail builds if the code quality falls below a certain threshold.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Docker Assignment</title>
      <dc:creator>Fahad Rehman</dc:creator>
      <pubDate>Fri, 03 Mar 2023 03:43:51 +0000</pubDate>
      <link>https://www.debug.school/fahadrehman23/docker-assignment-49dc</link>
      <guid>https://www.debug.school/fahadrehman23/docker-assignment-49dc</guid>
      <description>&lt;p&gt;1.) What is Docker and why is it used?&lt;/p&gt;

&lt;p&gt;Docker is an open-source containerization platform that allows developers to package applications and dependencies into a portable container that can be deployed consistently across different environments, such as development, testing, and production.&lt;br&gt;
Used:- &lt;br&gt;
Consistency: Docker containers ensure that the application runs consistently across different environments, regardless of the underlying system or dependencies.&lt;br&gt;
Portability: Docker containers can be easily moved between different hosts, platforms, and cloud providers, making it easy to deploy applications in various environments.&lt;br&gt;
Scalability: Docker containers can be scaled up or down quickly and easily, making it easier to manage applications that have varying levels of usage.&lt;br&gt;
Resource efficiency: Docker containers use fewer resources than virtual machines, allowing for more efficient use of hardware resources and reducing costs.&lt;/p&gt;

&lt;p&gt;2.) What is a Docker image and how is it different from a Docker container?&lt;br&gt;
A Docker image is a pre-built, standalone, and executable package that contains everything needed to run a specific application, including the application code, dependencies, and other required components such as system libraries and tools. Docker images are created using a Dockerfile, which is a script that defines the instructions needed to build the image.On the other hand, a Docker container is a running instance of a Docker image that is isolated from the host system and other containers. Each container has its own file system, networking, and process space, and runs as a lightweight, standalone unit. Docker containers are created by instantiating an image using the Docker engine.&lt;/p&gt;

&lt;p&gt;3.) How do you create a Docker image and run a Docker container?&lt;br&gt;
To create a Docker image, need to create a Dockerfile, which is a script that defines the instructions for building the image. &lt;br&gt;
Here are the basic steps to create a Docker image:&lt;br&gt;
Create a Dockerfile: This is a text file that contains the instructions needed to build the Docker image. The Dockerfile typically includes commands to install dependencies, copy files into the image, and set environment variables.&lt;br&gt;
Build the Docker image: Use the docker build command to build the Docker image from the Dockerfile. This command will read the instructions in the Dockerfile and create an image based on those instructions.&lt;br&gt;
To run a Docker container based on the image you just created, follow these steps:&lt;br&gt;
Start a Docker container: docker run -d -p 8080:80 my-image&lt;br&gt;
Check the status of the container: Use the docker ps command to check the status of the container. This command will list all the running containers on your system.&lt;/p&gt;

&lt;p&gt;4.) What is a Dockerfile and how do you use it to create a Docker image?&lt;br&gt;
A Dockerfile is a script that contains a set of instructions for building a Docker image. The Dockerfile defines how the image should be constructed, including what software packages and dependencies should be included, how files should be copied, and what commands should be run.&lt;/p&gt;

&lt;p&gt;steps to create a Docker image using a Dockerfile:&lt;/p&gt;

&lt;p&gt;Create a Dockerfile: The Dockerfile typically includes a series of FROM, RUN, COPY, and CMD commands to install dependencies, copy files into the image, and set environment variables.&lt;br&gt;
Define the base image: The FROM command is used to specify the base image to use for the Docker image. For example, if you want to create an image based on Ubuntu, you would use the command FROM ubuntu.&lt;/p&gt;

&lt;p&gt;Install dependencies and set up the environment: Use the RUN command to install any necessary software packages and dependencies, and set up the environment. &lt;br&gt;
For example:- RUN apt-get update &amp;amp;&amp;amp; apt-get install -y python3 to install Python 3.&lt;/p&gt;

&lt;p&gt;Copy files into the image: Use the COPY command to copy files from the host machine into the Docker image. &lt;br&gt;
For example, COPY app.py /app/ &lt;/p&gt;

&lt;p&gt;Build the Docker image: docker build -t my-image .&lt;/p&gt;

&lt;p&gt;Run the Docker container: Use the docker run command to start a new container from the image you just built&lt;br&gt;
docker run -d -p 8080:80 my-image&lt;/p&gt;

&lt;p&gt;5.) How can you inspect the contents of a Docker container and the changes made to a container while it was running?&lt;/p&gt;

&lt;p&gt;Docker exec command: You can use the docker exec command to run a command inside a running container.&lt;br&gt;
For example:- docker exec my-container cat /var/log/myapp.log will show the contents of the myapp.log file in the running container named my-container.&lt;/p&gt;

&lt;p&gt;Docker logs command: You can use the docker logs command to view the logs generated by a running container.&lt;br&gt;
For example:- docker logs my-container&lt;/p&gt;

&lt;p&gt;Docker diff command: You can use the docker diff command to view the changes made to the filesystem of a container since it was created.&lt;br&gt;
For example:- docker diff my-container &lt;/p&gt;

&lt;p&gt;6.) How can you share a Docker image with others and pull an image from a Docker registry?&lt;br&gt;
steps to share a Docker image with others-&lt;br&gt;
Tag the Docker image:- docker tag my-image myusername/my-image.&lt;br&gt;
Push the Docker image:- docker push myusername/my-image&lt;/p&gt;

&lt;p&gt;7.) What are the different network modes available in Docker and how do you choose the right network mode for your application?&lt;br&gt;
Host mode&lt;br&gt;
Bridge mode&lt;br&gt;
Overlay mode&lt;br&gt;
Macvlan mode&lt;br&gt;
None mode&lt;/p&gt;

&lt;p&gt;8.)How can you mount a volume in a Docker container and share data between the host and container?&lt;/p&gt;

&lt;p&gt;To mount a volume in a Docker container and share data between the host and container, you can use the -v or --mount option when running the container. &lt;/p&gt;

&lt;p&gt;9.What is the difference between a Docker Compose file and a Dockerfile, and how are they used in deploying multi-container applications?&lt;/p&gt;

&lt;p&gt;A Dockerfile is a text file that contains the commands that a user can execut to build an image.&lt;br&gt;
Docker Compose is a tool for defining and running multi-container Docker applications.&lt;/p&gt;

&lt;p&gt;10.How can you monitor the performance of a Docker container and diagnose issues with it?&lt;/p&gt;

&lt;p&gt;We can monitor the performance of a docker container by executing the command "docker stats".&lt;/p&gt;

&lt;p&gt;11.Components of Docker and its Brief Summary&lt;br&gt;
Docker Engine: Docker Engine is a containerization technology that is used to build and containerize applications.&lt;br&gt;
Docker Image: A Docker image contains set of instructions that are used to create a container.&lt;br&gt;
Docker Registry: A Docker registry is a storage system for Docker images.&lt;br&gt;
Docker container: Docker containers are standardized, executable components that combine application source code with the operating system and dependencies that are required to run the code in any environment.&lt;/p&gt;

&lt;p&gt;12.What is the differenet between docker pause and unpause?&lt;br&gt;
The docker pause command is used to suspend all processes in the specified containers The docker unpause command un-suspends all processes in the specified containers.&lt;/p&gt;

&lt;p&gt;13.What is the differenet between docker stop and kill?&lt;br&gt;
he docker stop command stops the container and provides a safe way to stop the container whereas docker kill command kills one or more containers.&lt;/p&gt;

&lt;p&gt;14.What is the differenet between docker exec and attach?&lt;br&gt;
The docker exec command is used to run a new command in a running container whereas docker attach command is used to attach the terminal's standard input, output, and error to a running container.&lt;/p&gt;

&lt;p&gt;15.List of dockerfile instructions and its Brief Summary?&lt;br&gt;
Dockerfile instructions with a brief summary:&lt;br&gt;
FROM: Specifies the base image to use for the Docker image being built.&lt;br&gt;
MAINTAINER: Specifies the name and email address of the person or team responsible for maintaining the image.&lt;br&gt;
RUN: Runs a command inside the Docker image to install or configure software.&lt;br&gt;
COPY or ADD: Copies files or directories from the host machine into the Docker image.&lt;br&gt;
CMD: Specifies the command to be run when a container is started from the image.&lt;br&gt;
ENTRYPOINT: Specifies the command to be run when a container is started from the image, but allows for additional command-line arguments to be passed to the container.&lt;br&gt;
ENV: Sets environment variables inside the Docker image.&lt;br&gt;
EXPOSE: Specifies the network ports that the Docker container will listen on at runtime.&lt;br&gt;
VOLUME: Specifies the directories or files that the Docker container should create a volume for at runtime.&lt;br&gt;
USER: Sets the user ID or name that the Docker container will run as.&lt;br&gt;
WORKDIR: Sets the working directory for any RUN, CMD, ENTRYPOINT, COPY, or ADD commands that follow it in the Dockerfile.&lt;/p&gt;

&lt;p&gt;16.What is the differenet between CMD vs Entry&lt;/p&gt;

&lt;p&gt;CMD: This command is used to run a docker container by specifying a default command that gets executed for all the containers of that image by default.&lt;br&gt;
Entrypoint: This instruction is used to configure the executables that will always run after the container is initiated.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git Assignment - 1</title>
      <dc:creator>Fahad Rehman</dc:creator>
      <pubDate>Fri, 20 Jan 2023 04:54:20 +0000</pubDate>
      <link>https://www.debug.school/fahadrehman23/git-assignment-1-3no7</link>
      <guid>https://www.debug.school/fahadrehman23/git-assignment-1-3no7</guid>
      <description>&lt;p&gt;Q:- What is Git?&lt;br&gt;
Ans:- Git is a version controlling system, It helps us in tracking the changes in our code.&lt;/p&gt;

&lt;p&gt;Q:- How git works? Architecture of git?&lt;br&gt;
Ans:- Git works by keeping a local copy of a repo on our system, which is further used to make the changes in the files and to add and commit them in the repo when they are ready to be shared. Once the commit is done for the file change then we can push those changes to a remote repo or on the host like Github. People having the access to that repo can easily pull those changes to there local repo. Git also uses branching which allow us for multiple versions of the code.&lt;/p&gt;

&lt;p&gt;Q:- Exaplain Why Git is Distributed?&lt;br&gt;
Ans:- Git is distributed because it allows everyone who has the access to have the complete copy of the repo on there system, it also provides flexibility to work by maintaining the versions.&lt;/p&gt;

&lt;p&gt;Q:- Explain Git Workflow with image?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/images/hm3_lTjjzcshykNBzI4jFuUvM53PbbpdIjNHbyLD4VI/w:880/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvYXJ0/aWNsZXMvdDB1bmw5/Z2V4dGE0dzg0eW5z/MTAucG5n" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/images/hm3_lTjjzcshykNBzI4jFuUvM53PbbpdIjNHbyLD4VI/w:880/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvYXJ0/aWNsZXMvdDB1bmw5/Z2V4dGE0dzg0eW5z/MTAucG5n" alt="Image description" width="880" height="629"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q:- List of Top 10 Git commands&lt;br&gt;
Ans:-&lt;br&gt;
git init&lt;br&gt;
git add&lt;br&gt;
git commit&lt;br&gt;
git pull&lt;br&gt;
git push&lt;br&gt;
git status&lt;br&gt;
git config&lt;br&gt;
git log&lt;br&gt;
git clone&lt;br&gt;
git branch&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
