<?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>DEV Community: Shreyas Ghanekar</title>
    <description>The latest articles on DEV Community by Shreyas Ghanekar (@shreyas_ghanekar_).</description>
    <link>https://dev.to/shreyas_ghanekar_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2207978%2F418b0ae7-8cb0-446d-befb-3ae01d28623b.png</url>
      <title>DEV Community: Shreyas Ghanekar</title>
      <link>https://dev.to/shreyas_ghanekar_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shreyas_ghanekar_"/>
    <language>en</language>
    <item>
      <title>Simplify GitHub Workflow Management with My-GitHub-Manager</title>
      <dc:creator>Shreyas Ghanekar</dc:creator>
      <pubDate>Sun, 29 Dec 2024 07:16:12 +0000</pubDate>
      <link>https://dev.to/shreyas_ghanekar_/simplify-github-workflow-management-with-my-github-manager-3ca4</link>
      <guid>https://dev.to/shreyas_ghanekar_/simplify-github-workflow-management-with-my-github-manager-3ca4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Simplify GitHub Workflow Management with My-GitHub-Manager&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Managing repositories, collaborators, and actions on GitHub can be a daunting task, especially when you have multiple projects to juggle. Introducing my-github-manager, a robust command-line tool designed to streamline your GitHub workflows with ease and efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why My-GitHub-Manager?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub provides a feature-rich platform for developers, but managing repositories programmatically can save a significant amount of time, especially for repetitive tasks. My-GitHub-Manager leverages the GitHub API to provide a seamless experience for repository management, collaborator tracking, workflow monitoring, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List Users with Read Access: Identify collaborators who have read access to a repository.&lt;/li&gt;
&lt;li&gt;List Repository Packages: Quickly fetch the packages associated with a repository.&lt;/li&gt;
&lt;li&gt;Monitor Workflows and Actions: Retrieve workflows and actions to track automation within your repository.&lt;/li&gt;
&lt;li&gt;Track Repository Projects: Access repository projects to keep an overview of ongoing development efforts.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manage Discussions, Issues, and Pull Requests: Stay on top of repository activity with detailed information about discussions, issues, and pull requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit History: Review commit history to ensure consistent development practices. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repository Invitations and Emails: Easily manage repository invitations and associated email addresses. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User Management: Follow users, list public repositories of any user, and fetch detailed profile data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can install my-github-manager globally using npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g my-github-manager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub Personal Access Token (PAT): Ensure you have a PAT with the following scopes:&lt;/p&gt;

&lt;p&gt;repo&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;repo:status&lt;br&gt;
repo_deployment&lt;br&gt;
public_repo&lt;br&gt;
repo:invite&lt;br&gt;
security_events&lt;br&gt;
read:user&lt;br&gt;
user:email&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can create a PAT by navigating to your GitHub Developer Settings.&lt;/p&gt;

&lt;p&gt;jq: Install jq for parsing JSON responses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install jq  # For Debian/Ubuntu
brew install jq          # For macOS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run the tool with:&lt;/p&gt;

&lt;p&gt;my-github-manager&lt;/p&gt;

&lt;p&gt;The tool will prompt you to enter your GitHub username and PAT for authentication. Once authenticated, you can navigate through the interactive menu to perform various actions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Highlighted Commands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;List Collaborators with Read Access&lt;/strong&gt;&lt;br&gt;
Identify collaborators with pull access to your repository:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;my-github-manager&lt;br&gt;
 Select "List users with read access"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Fetch Repository Packages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;List all packages in a repository:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;my-github-manager&lt;br&gt;
 Select "List packages in the repository"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Monitor Workflows and Actions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve workflows and actions for automation insights:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;my-github-manager&lt;br&gt;
 Select "List workflows" or "List actions"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Manage Repository Discussions&lt;/strong&gt;&lt;br&gt;
Fetch and view repository discussions to stay updated:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;my-github-manager&lt;br&gt;
 Select "List discussions"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Advanced Error Handling and Retry Mechanism&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My-GitHub-Manager ensures robust error handling. For example, if a request fails due to an incorrect repository name or an expired PAT, the tool prompts you to retry the operation with corrected inputs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Developers Love It&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interactive Menu: Navigate through repository management tasks effortlessly.&lt;/li&gt;
&lt;li&gt;Error Feedback: Receive detailed error messages with actionable suggestions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Customizable: Easily extend the script to add more GitHub API endpoints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Source and Contributions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This project is open source and available on &lt;a href="https://github.com/ShreyashPG/my-github-manager" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. Contributions are welcome! Feel free to raise issues, suggest features, or submit pull requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My-GitHub-Manager is your go-to tool for simplifying GitHub management tasks. With its interactive features and seamless integration with the GitHub API, it saves time and boosts productivity for developers.&lt;/p&gt;

&lt;p&gt;Try my-github-manager today and revolutionize the way you manage your GitHub repositories!&lt;/p&gt;

</description>
      <category>bash</category>
      <category>github</category>
      <category>git</category>
      <category>npm</category>
    </item>
    <item>
      <title>Top 5 SQL questions asked in interviews</title>
      <dc:creator>Shreyas Ghanekar</dc:creator>
      <pubDate>Sat, 09 Nov 2024 11:37:06 +0000</pubDate>
      <link>https://dev.to/shreyas_ghanekar_/top-5-sql-questions-asked-in-interviews-mn5</link>
      <guid>https://dev.to/shreyas_ghanekar_/top-5-sql-questions-asked-in-interviews-mn5</guid>
      <description>&lt;p&gt;In this article , you will encounter top sql questions and their answers asked in interviews. This will help you prepare in for interviews.&lt;/p&gt;

&lt;p&gt;Question 1 : &lt;strong&gt;What is the difference between DELETE and TRUNCATE ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ans : &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;delete command in sql is used to delete a particular row or a set of rows from the table which meet the conditions specified in the query. Syntax : delete from table_name where condition;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;truncate command is used to delete all the rows from a table keeping the table structure intact.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Syntax : truncate table table_name;&lt;/p&gt;

&lt;p&gt;Question 2 : &lt;strong&gt;What are the different subsets of SQL ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ans : The different subsets of SQL are DDL, DML, DCL, TCL . Each one is discused in detail below.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;DDL ( Data Definition Language ) : This subset mainly consist of sql commands such as CREATE, ALTER, DROP. CREATE command is used to create a new table in sql. ALTER command is used to alter table structure. DROP command is used to drop tables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DML ( Data Manipulation Language ) : In sql we use certain commands to update, delete or manipulate the contains of a table. These commands are SELECT , INSERT, UPDATE, DELETE. SELECT command is used to display rows of a table. INSERT command is used to add rows in a table. UPDATE command is used to update the values in rows of a table. DELETE command is used to delete rows of a table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DCL ( Data Control Language ) : DCL in sql is used to revoke or grant access to a user. Example : REVOKE command is used to revoke access from a user. GRANT command is used to grant certain access to a user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TCL ( Transaction Control Language ) : It is used to manage transactions within the database. TCL commands include COMMIT, ROLLBACK, and SAVEPOINT. COMMIT is used to commit changes made during a transaction, ROLLBACK is used to undo changes made during a transaction, and SAVEPOINT is used to mark a point within a transaction that can be rolled back to if necessary.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Question 3 : &lt;strong&gt;What do you mean by DBMS&amp;gt; What are its different types ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ans : A DBMS (Database Management System) is a software or technology used to manage data from a database. It allows users to store, modify and retrieve data in an organized way. It also provides security to the database.&lt;/p&gt;

&lt;p&gt;These are the types of DBMS :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hierarchical DBMS&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hierarchical DBMS organizes data in a tree-like structure with parent-child relationships.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each parent can have multiple children, but a child can have only one parent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data navigation is done through paths.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Network DBMS&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Network DBMS allows more flexible relationships, where a child can have multiple parents.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uses a network model with sets and records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data navigation is done through sets.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Relational DBMS (RDBMS)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Relational DBMS stores data in tables with rows and columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Relationships are established using keys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data access is done using SQL (Structured Query Language).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NoSQL DBMS&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;NoSQL DBMS is designed for handling large volumes of unstructured or semi-structured data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Includes document databases, key-value stores, column-family stores, and graph databases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data access varies depending on the specific NoSQL type.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Object Oriented DBMS (ODBMS)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Object Oriented DBMS stores data as objects, which can have attributes and methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Supports inheritance, encapsulation, and polymorphism.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data access is done using object query language (OQL).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Question 4 : &lt;strong&gt;What do you mean by table and field in SQL ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ans : Table: A table is a structured collection of related data organized in rows and columns within a database. Each table represents an entity (e.g., “Students” or “Employees”) and stores data for that specific category. For example, a table named Students might store data like student ID, name, age, and department for each student.&lt;/p&gt;

&lt;p&gt;Field (or Column): A field is a single attribute or data type in a table, defining what type of information each entry (row) in the table will hold. In the Students table example, fields could include StudentID, Name, Age, and Department. Each field has a specific data type, like INTEGER, VARCHAR, or DATE, which dictates the kind of data that can be stored in that column.&lt;/p&gt;

&lt;p&gt;Question 5: &lt;strong&gt;What is foreign key?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ans : A foreign key in SQL is a column (or a set of columns) in one table that references the primary key of another table. This key is used to create a link between two tables, ensuring referential integrity by making sure that the values in the foreign key column(s) match values in the primary key column(s) of the referenced table.&lt;br&gt;
Example&lt;/p&gt;

&lt;p&gt;Let’s say you have two tables: Orders and Customers.&lt;/p&gt;

&lt;p&gt;Step 1: Create the Customers table&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE Customers (
    CustomerID INT PRIMARY KEY,
    CustomerName VARCHAR(100),
    ContactNumber VARCHAR(15)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Create the Orders table with a foreign key referencing Customers&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE Orders (
    OrderID INT PRIMARY KEY,
    OrderDate DATE,
    CustomerID INT,
    FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CustomerID in the Orders table is the foreign key that references &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CustomerID in the Customers table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This ensures each order is linked to an existing customer.&lt;br&gt;
Thanks for reading !!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>dbms</category>
      <category>nosql</category>
    </item>
    <item>
      <title>useState in react explained in 5 mins</title>
      <dc:creator>Shreyas Ghanekar</dc:creator>
      <pubDate>Fri, 08 Nov 2024 14:36:20 +0000</pubDate>
      <link>https://dev.to/shreyas_ghanekar_/usestate-in-react-explained-in-5-mins-5bhb</link>
      <guid>https://dev.to/shreyas_ghanekar_/usestate-in-react-explained-in-5-mins-5bhb</guid>
      <description>&lt;p&gt;&lt;strong&gt;Understanding useState in React in 5 Minutes&lt;/strong&gt;&lt;br&gt;
When building web applications with React, we often rely on hooks to add functionality to functional components. Hooks allow us to use features typically reserved for class components — like managing state and lifecycle methods — without the need for classes or the this keyword. One of the most popular hooks in React is useState , lets explore it !!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is useState?&lt;/strong&gt;&lt;br&gt;
The useState hook lets you add state to functional components. Whether you're working with numbers, strings, arrays, or objects, useState helps you manage updates to your data and re-render your component whenever the data changes. For example, you might use useState to keep track of a counter that increments each time a button is pressed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;useState Syntax&lt;/strong&gt;&lt;br&gt;
The syntax for useState is straightforward:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const [variableName, setVariableName] = useState(initialValue);&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;variableName is the state variable that holds the current value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;setVariableName is a function that updates the state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;initialValue is the initial value you want the variable to hold.&lt;br&gt;
Example: Using useState for a Counter&lt;br&gt;
Let’s look at a simple example where we create a counter that increments by one each time a button is pressed.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react';
function counter ()
{
const [count, setCount] =useState(0);

function increaseCount()
{
setCount(count+1);

}
return (
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;{count}&amp;lt;/p&amp;gt;
&amp;lt;button onclick={increaseCount}&amp;gt;Tap&amp;lt;/button&amp;gt;
&amp;lt;/div&amp;gt;
)
}

export default counter; 


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code:&lt;br&gt;
count is the state variable with an initial value of 0.&lt;br&gt;
setCount is a function that lets us update count.&lt;br&gt;
Each time we call increaseCount, setCount is used to update count by incrementing it by 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Few Tips&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Rerendering on State Change: Every time you call setCount with a new value, React rerenders the component to display the updated state.&lt;br&gt;
Avoid Direct State Modification: Always use the setter function (setCount here) instead of modifying the variable directly. This ensures React knows about the update.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Initial Value: You can pass any initial value to useState, whether it’s a string, array, or object.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using useState is a simple yet powerful way to manage local state in React, and it’s often the first hook developers learn. Mastering it is essential for creating dynamic, interactive applications.&lt;/p&gt;

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