<?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>Forem: Lalit Kumawat</title>
    <description>The latest articles on Forem by Lalit Kumawat (@lalitkumawat1m).</description>
    <link>https://forem.com/lalitkumawat1m</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%2F1114965%2Fd95d4381-f443-4547-bf49-9b5d2d87abba.jpeg</url>
      <title>Forem: Lalit Kumawat</title>
      <link>https://forem.com/lalitkumawat1m</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/lalitkumawat1m"/>
    <language>en</language>
    <item>
      <title>The Future of Web Development: Predictions and Possibilities</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Sat, 05 Aug 2023 14:55:39 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/the-future-of-web-development-predictions-and-possibilities-2b5a</link>
      <guid>https://forem.com/lalitkumawat1m/the-future-of-web-development-predictions-and-possibilities-2b5a</guid>
      <description>&lt;p&gt;Current State of Web Development&lt;br&gt;
Web improvement is constantly developing, driven by progressions in innovation and the changing necessities of clients. Web developers currently use different innovations like HTML, CSS, JavaScript, and structures like Respond, Rakish, or Vue.js to fabricate dynamic and responsive sites. Nonetheless, they face difficulties connected with cross-program similarity, security weaknesses, and the requirement for quicker stacking pages.&lt;/p&gt;

&lt;p&gt;Predictions for the Future of Web Development&lt;br&gt;
AI and Machine Learning in Web Development&lt;br&gt;
As computer-based intelligence and AI advancements progress, they are supposed to alter web improvement. Artificial intelligence-controlled apparatuses can robotize tedious undertakings, distinguish messes, and streamline site execution, prompting more proficient advancement processes.&lt;/p&gt;

&lt;p&gt;Progressive Web Apps (PWAs)&lt;br&gt;
PWAs offer another way to deal with web advancement, consolidating the best of web and versatile applications. They furnish clients with application-like encounters, including disconnected admittance, message pop-ups, and quicker stacking times, while being effectively discoverable through web search tools.&lt;/p&gt;

&lt;p&gt;Voice User Interface (VUI) Integration&lt;br&gt;
With the ascent of remote helpers and brilliant speakers, voice search and orders are becoming more predominant. Web developers should streamline sites for voice communication, guaranteeing consistent client encounters through the VUI mix.&lt;/p&gt;

&lt;p&gt;Photo by Micheal Ogungbe on Unsplash&lt;/p&gt;

&lt;p&gt;Augmented Reality (AR) and Virtual Reality (VR) on the Web&lt;br&gt;
AR and VR advancements are tracking down their direction into the web, empowering vivid encounters for clients. Web designers will investigate ways of incorporating AR and VR components into sites, offering intelligence and drawing in satisfaction.&lt;/p&gt;

&lt;p&gt;Photo by Shubham Dhage on Unsplash&lt;/p&gt;

&lt;p&gt;Blockchain and Web Development&lt;br&gt;
Blockchain innovation’s decentralized nature gives improved security and straightforwardness. Web designers might use blockchain for secure validation, information on the board, and decentralized applications (DApps).&lt;/p&gt;

&lt;p&gt;Internet of Things (IoT) Impact on Web Development&lt;br&gt;
As IoT gadgets become more broad, web developer should oblige their cooperation with sites and applications. This could incorporate streamlining UIs for more modest screens and guaranteeing consistent correspondence among gadgets and the web.&lt;/p&gt;

&lt;p&gt;Possibilities in Web Development&lt;br&gt;
Enhanced User Experience&lt;br&gt;
The eventual fate of web advancement vows to convey unrivaled client encounters. Sites will be more natural, outwardly engaging, and versatile to individual inclinations, bringing about higher client fulfillment and commitment.&lt;/p&gt;

&lt;p&gt;Personalization and Customization&lt;br&gt;
Web developers will zero in on personalization by utilizing client information to offer customized content and encounters. Customization choices for UIs and functionalities will become more regular, permitting clients to have a customized venture through sites.&lt;/p&gt;

&lt;p&gt;Faster Loading Times and Performance&lt;br&gt;
As web speeds improve, web designers will focus on enhancing stacking times and, by and large, site execution. Clients can anticipate quicker access should data and smoother routes.&lt;/p&gt;

&lt;p&gt;Enhanced Security Measures&lt;br&gt;
With rising digital dangers, web developers will embrace vigorous safety efforts to safeguard clients’ information and security. Encryption and secure conventions will become standard practice in web advancement.&lt;/p&gt;

&lt;p&gt;Integration of Real-time Features&lt;br&gt;
Web designers will investigate continuous elements, empowering live communications, like cooperative altering, ongoing visits, and warnings. This will improve correspondence and efficiency on sites and web applications.&lt;/p&gt;

&lt;p&gt;The Role of Web Developers in the Future&lt;br&gt;
Evolving Skillsets and Knowledge&lt;br&gt;
Web developers should remain refreshed with recent advances and patterns to stay applicable in the high-speed computerized scene. Constant learning and upskilling will be crucial for satisfying the needs representing things to come.&lt;/p&gt;

&lt;p&gt;Collaboration with AI and Automation&lt;br&gt;
Artificial intelligence-fueled instruments will help web designers. However, human imagination and critical thinking abilities will stay crucial. Joint efforts among people and artificial intelligence will prompt more creative and productive web improvement processes.&lt;/p&gt;

&lt;p&gt;Focus on Accessibility and Inclusivity&lt;br&gt;
Web developers will focus on openness to guarantee that everyone uses sites equally. Inclusivity in the plan will become a standard work, elevating equivalent admittance to data and administrations on the web.&lt;/p&gt;

&lt;p&gt;Addressing Environmental Sustainability&lt;br&gt;
Web developers will be aware of natural effects as the advanced impression develops. They will investigate eco-accommodating facilitating arrangements and improve sites to lessen energy utilization.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
The eventual fate of web improvement holds energizing prospects, driven by headways in artificial intelligence, AR, VR, IoT, and other advancements. As web designers adjust to these changes, clients can anticipate upgraded encounters, consistent collaborations, and a more customized internet-based climate. The vital lies in finding harmony between robotization and human imagination to shape a web scene that takes special care of the requirements, everything being equal.&lt;/p&gt;

&lt;p&gt;I am currently building a newsletter to share informative articles and news, covering ai, startups 🚀, tech 📱, and programming 💻! my progress in becoming Software Developer with little experience, and how you can learn from my experience.&lt;/p&gt;

&lt;p&gt;Please subscribe via this &lt;a href="//www.lalitkumawattech.substack.com"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also published here.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A simple guide to JavaScript concurrency in Node.js and a few traps that come with it</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Sat, 05 Aug 2023 14:46:29 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/a-simple-guide-to-javascript-concurrency-in-nodejs-and-a-few-traps-that-come-with-it-3bom</link>
      <guid>https://forem.com/lalitkumawat1m/a-simple-guide-to-javascript-concurrency-in-nodejs-and-a-few-traps-that-come-with-it-3bom</guid>
      <description></description>
    </item>
    <item>
      <title>Why Are Two Similar Objects Not Equal in JavaScript?</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Sun, 30 Jul 2023 13:41:11 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/why-are-two-similar-objects-not-equal-in-javascript-4i0</link>
      <guid>https://forem.com/lalitkumawat1m/why-are-two-similar-objects-not-equal-in-javascript-4i0</guid>
      <description>&lt;p&gt;In JavaScript, two objects may not be equal even though they appear to be similar. Why is that the case? 🤔 Let's understand why.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;const obj1 = {&lt;br&gt;
  name: "Dillion"&lt;br&gt;
}&lt;br&gt;
const obj2 = {&lt;br&gt;
  name: "Dillion"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;console.log(obj1 === obj2)&lt;br&gt;
// false&lt;br&gt;
As you can see here, obj1 and obj2 look similar. They both have the property of name with a value of "Dillion". But comparing them--obj1 === obj2--returns false. 🤔&lt;/p&gt;

&lt;p&gt;The same thing applies to arrays:&lt;/p&gt;

&lt;p&gt;let arr1 = [1, 2, 3]&lt;br&gt;
let arr2 = [1, 2, 3]&lt;/p&gt;

&lt;p&gt;console.log(arr1 === arr2)&lt;br&gt;
// false&lt;br&gt;
To understand why this is the case, you have to understand what primitive and reference values are in JavaScript.&lt;/p&gt;

&lt;p&gt;Primitive and Reference Values&lt;br&gt;
Think of a primitive value as one value (static, fixed) and a reference value as a group of multiple values or (dynamic) value.&lt;/p&gt;

&lt;p&gt;Primitive values are of the types string, number, boolean, null, undefined, symbol, and BigInt. These values are fixed and stored on the stack, for example:&lt;/p&gt;

&lt;p&gt;let name = "Dillion"&lt;br&gt;
let age = 60&lt;br&gt;
let isRaining = true&lt;br&gt;
image-71&lt;br&gt;
Reference values are of the object types which includes objects, arrays and functions. These values are dynamic (can contain multiple values, properties, and can be modified over time) and are stored on the heap, with a reference value in the stack, for example:&lt;/p&gt;

&lt;p&gt;let array = [1, 2, 3]&lt;br&gt;
let obj = { name: "Dillion" }&lt;br&gt;
function print() {&lt;br&gt;
  console.log('hello')&lt;br&gt;
}&lt;br&gt;
image-72&lt;br&gt;
The reference value is an address that points to the location of the data in the memory.&lt;/p&gt;

&lt;p&gt;Here's an article where I explained the difference in more detail: Primitive and Reference Values Simplified&lt;/p&gt;

&lt;p&gt;Comparing Primitive and Reference Values&lt;br&gt;
When you compare primitive values, you are comparing static values, which have a fixed size on the stack:&lt;/p&gt;

&lt;p&gt;let name = "Dillion"&lt;br&gt;
let name2 = "Dillion"&lt;/p&gt;

&lt;p&gt;console.log(name === name2)&lt;br&gt;
// true&lt;br&gt;
Here, we compare name and name2 if they are equal. What happens here is that JavaScript checks for the name and name2 variables in the stack, and then it sees that they have equal values, so it's true--they are equal.&lt;/p&gt;

&lt;p&gt;In the case of objects, you are comparing the references (the addresses) and not the exact values. Here's what I mean.&lt;/p&gt;

&lt;p&gt;If you have two arrays like this:&lt;/p&gt;

&lt;p&gt;let array = [1, 2, 3]&lt;br&gt;
let array2 = [1, 2, 3]&lt;br&gt;
Here's what it would look like on the stack and heap:&lt;/p&gt;

&lt;p&gt;image-73&lt;br&gt;
As you can see here, for array, [1, 2, 3] is not stored on the stack. It is stored on the heap, and the memory location of that data is stored on the stack as a reference.&lt;/p&gt;

&lt;p&gt;The same thing for array2; [1, 2, 3] is not stored on the stack. It is stored on the heap, in a different memory location and the reference is stored on the stack.&lt;/p&gt;

&lt;p&gt;When you compare both arrays like array === array2, you're not exactly comparing [1, 2, 3] === [1, 2, 3] but you're actually comparing refForArray === refForArray2 (ref is short for reference).&lt;/p&gt;

&lt;p&gt;As we saw in the heap illustration, array and array2 have different memory locations, which means they have different references, which then means the variable array is not equal to the variable array2.&lt;/p&gt;

&lt;p&gt;The only way array and array2 can be equal, is if you have something like:&lt;/p&gt;

&lt;p&gt;let array = [1, 2, 3]&lt;br&gt;
let array2 = array&lt;/p&gt;

&lt;p&gt;console.log(array === array2)&lt;br&gt;
// true&lt;br&gt;
By assigning array to array2, you are assigning the reference that array holds in the stack, to array2:&lt;/p&gt;

&lt;p&gt;image-74&lt;br&gt;
Therefore, array and array2 now have the same value--the same reference.&lt;/p&gt;

&lt;p&gt;How to compare objects&lt;br&gt;
We've seen that in our attempt to compare two object values, we are actually comparing the reference and not the object data. So how do we correctly compare the object data?&lt;/p&gt;

&lt;p&gt;There are a couple of ways you can do this but I will share two of them.&lt;/p&gt;

&lt;p&gt;Compare objects using _.isEqual from Lodash&lt;br&gt;
You can write a function that does an equality check between two objects, but it could become complicated when you have to compare deeply nested objects which can have different values, including objects.&lt;/p&gt;

&lt;p&gt;A faster approach is using the isEqual method from Lodash which is an effective solution that handles deep comparison between two values:&lt;/p&gt;

&lt;p&gt;const _ = require('lodash'); &lt;/p&gt;

&lt;p&gt;const array = [1, 2, 3]&lt;br&gt;
const object = { name: "Dillion" }&lt;/p&gt;

&lt;p&gt;const array2 = [1, 2, 3]&lt;br&gt;
const object2 = { name: "Dillion" }&lt;/p&gt;

&lt;p&gt;console.log(_.isEqual(array, array2))&lt;br&gt;
// true&lt;/p&gt;

&lt;p&gt;console.log(_.isEqual(object, object2))&lt;br&gt;
/ true&lt;br&gt;
Compare objects using JSON.stringify()&lt;br&gt;
Say you don't want to use Lodash, you can use JSON.stringify which recursively stringifies an object or array to a string:&lt;/p&gt;

&lt;p&gt;const array = [1, 2, 3]&lt;br&gt;
const object = { name: "Dillion" }&lt;/p&gt;

&lt;p&gt;const array2 = [1, 2, 3]&lt;br&gt;
const object2 = { name: "Dillion" }&lt;/p&gt;

&lt;p&gt;console.log(&lt;br&gt;
  JSON.stringify(array)&lt;br&gt;
  ===&lt;br&gt;
  JSON.stringify(array2)&lt;br&gt;
)&lt;br&gt;
// true&lt;/p&gt;

&lt;p&gt;console.log(&lt;br&gt;
  JSON.stringify(object)&lt;br&gt;
  ===&lt;br&gt;
  JSON.stringify(object2)&lt;br&gt;
)&lt;br&gt;
// true&lt;br&gt;
Since the stringified version is a primitive type (static), the data of both values can be compared. But here is a limitation with JSON.stringify().&lt;/p&gt;

&lt;p&gt;JSON.stringify can return different results if the order or properties in an object are different. For example:&lt;/p&gt;

&lt;p&gt;const object = {&lt;br&gt;
  name: "Dillion",&lt;br&gt;
  age: 50&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;const object2 = {&lt;br&gt;
  age: 50,&lt;br&gt;
  name: "Dillion"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;console.log(&lt;br&gt;
  JSON.stringify(object)&lt;br&gt;
  ===&lt;br&gt;
  JSON.stringify(object2)&lt;br&gt;
)&lt;br&gt;
// false&lt;br&gt;
In object, we have name coming before age, but in object2, we have age coming before name. This means their stringified representations would be different and as a result, their data are not equal.&lt;/p&gt;

&lt;p&gt;Wrap up&lt;br&gt;
Primitive and Reference values are fundamental concepts to understand when working with data in JavaScript. And as we have seen in this article, comparing primitive values is easier, but comparing reference values can be trickier because when you think you are comparing the data, you may not realize that you are actually comparing the reference.&lt;/p&gt;

&lt;p&gt;I am currently building a newsletter to share informative articles and news, covering ai, startups 🚀, tech 📱, and programming 💻! my progress in becoming Software Developer with little experience, and how you can learn from my experience.&lt;/p&gt;

&lt;p&gt;Please subscribe via this link.&lt;/p&gt;

&lt;p&gt;Also published here.&lt;/p&gt;

&lt;p&gt;I hope this article answers the question of "Why are two similar objects not equal in JavaScript?". If it does, please give this article a share 🙏🏾&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>web</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Node.js Development: All You Need to Know</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Thu, 20 Jul 2023 10:04:01 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/nodejs-development-all-you-need-to-know-4jpk</link>
      <guid>https://forem.com/lalitkumawat1m/nodejs-development-all-you-need-to-know-4jpk</guid>
      <description>&lt;p&gt;Node.js is a robust runtime environment that has revolutionized how developers build server-side applications. It allows developers to use JavaScript on both the frontend and backend, making it the perfect choice for building scalable, high-performance applications.&lt;/p&gt;

&lt;p&gt;According to the Stack Overflow Developer Survey 2022, Node.js was the most used web technology among professional developers, with more than 46% of votes, and it ranked 8th in the most loved technologies list. Therefore, Node.js can be considered a future-proof technology that every developer should know.&lt;/p&gt;

&lt;p&gt;This article will provide an in-depth overview of Node.js, including its features, use cases, advantages, disadvantages, step-by-step guides for setting up Node.js with different operating systems, and answers to some of the most frequently asked questions about Node.js.&lt;/p&gt;

&lt;p&gt;What is Node.js?&lt;/p&gt;

&lt;p&gt;Node.js is one of the most popular runtime environments for JavaScript, web servers, and other network applications in general. It is open-source, cross-platform, and known for its single-threaded asynchronous event-driven concurrency model. It was introduced in 2009 and revolutionalized the development world since it allowed developers to run JavaScript outside web browsers.&lt;/p&gt;

&lt;p&gt;Node.js is written in C, C++, and JavaScript. The core components of Node.js - the V8 engine and the libuv library - are written in C++ and C, respectively, since these languages provide low-level access to system resources, making them well-suited for building high-performance and efficient applications. JavaScript is mainly used to write the application logic.&lt;/p&gt;

&lt;p&gt;How Node.js Works&lt;/p&gt;

&lt;p&gt;When you run a JavaScript program in Node.js, the V8 engine will first parse the code to build an Abstract Syntax Tree - AST. The interpreter takes the AST generated by the V8 parser and generates bytecode from the AST. Lastly, the compiler compiles the bytecode into binary machine code that matches the CPU architecture of the running host.&lt;/p&gt;

&lt;p&gt;Although Node.js is single-threaded, it uses an event-driven, non-blocking I/O model to handle multiple requests simultaneously without blocking others. This behavior is achieved through the event loop.&lt;/p&gt;

&lt;p&gt;As the name implies, the event loop is a loop that runs continuously and waits for events to occur. When an event occurs, the event loop will add the event to an event queue. If there are no other pending events in the queue, the event loop will execute the event and remove it from the event queue. If there are any other events in the queue, they will be processed one at a time in a non-blocking manner.&lt;/p&gt;

&lt;p&gt;For example, consider the below example with two setTimeout functions:&lt;/p&gt;

&lt;p&gt;console.log('Starting');&lt;/p&gt;

&lt;p&gt;setTimeout(function() {&lt;br&gt;
  console.log('Timer 1 finished');&lt;br&gt;
}, 3000);&lt;/p&gt;

&lt;p&gt;setTimeout(function() {&lt;br&gt;
  console.log('Timer 2 finished');&lt;br&gt;
}, 2000);&lt;/p&gt;

&lt;p&gt;console.log('Stopping');&lt;/p&gt;

&lt;p&gt;Let's break down the execution of the above example into steps to understand better how the event loop works.&lt;/p&gt;

&lt;p&gt;The script will start and log "Starting" in the console.&lt;/p&gt;

&lt;p&gt;The first setTimeout function is called, and it will schedule the execution of the function passed to it after a delay of 3 seconds.&lt;/p&gt;

&lt;p&gt;The second setTimeout function will then be called and schedule the execution of the function passed to it after a delay of 2 seconds.&lt;/p&gt;

&lt;p&gt;The script will log "Stopping" in the console.&lt;/p&gt;

&lt;p&gt;Once the main thread execution finishes, Node.js starts processing the event loop and checks if there are any pending callbacks in the event queue. In this case, two callbacks are pending in the queue with timer events.&lt;/p&gt;

&lt;p&gt;The event loop runs the callback for the second setTimeout function, logs "Timer 2 finished" in the console, and removes the event from the queue.&lt;/p&gt;

&lt;p&gt;The event loop then runs the callback for the first setTimeout function, logs "Timer 1 finished" to the console, and removes the event from the queue. -Once the event queue is empty, the event loop will again start waiting for new events to add to the event queue.&lt;/p&gt;

&lt;p&gt;The event loop will constantly check the event queue for completed events. When an event's delay time has passed, it is moved from the event queue to the call stack for execution. In this case, the second setTimeout function has a shorter delay time than the first. So, it will be moved from the event queue to the call stack before the first setTimeout function. That's why the output of the example will look like the below:&lt;/p&gt;

&lt;p&gt;Starting&lt;br&gt;
Stopping&lt;br&gt;
Timer 2 finished&lt;br&gt;
Timer 1 finished&lt;/p&gt;

&lt;p&gt;What Are the Features of Node.js?&lt;/p&gt;

&lt;p&gt;Asynchronous I/O - Node.js uses an event-driven, non-blocking I/O model to handle multiple requests simultaneously without blocking the execution of other requests.&lt;/p&gt;

&lt;p&gt;Cross-platform - Supports Windows, macOS, and Linux operating systems.&lt;/p&gt;

&lt;p&gt;Fast startup time - Unlike other runtime environments, Node.js has a fast startup time. So developers can quickly test and iterate on their code.&lt;/p&gt;

&lt;p&gt;Web socket support - Built-in support for web sockets, allowing bi-directional communication.&lt;/p&gt;

&lt;p&gt;Large ecosystem - Many open-source modules and packages are available in NPM.&lt;/p&gt;

&lt;p&gt;No buffering - Node.js does not buffer data. Data is processed as soon as received, resulting in faster response times and reduced latency.&lt;/p&gt;

&lt;p&gt;What is Node.js used for?&lt;/p&gt;

&lt;p&gt;Node.js is a multi-purpose runtime environment that developers can use in a variety of ways:&lt;/p&gt;

&lt;p&gt;APIs - Highly scalable and performance-oriented APIs for web and mobile applications.&lt;/p&gt;

&lt;p&gt;Real-time applications - Ideal for real-time applications like chat apps and online gaming platforms.&lt;/p&gt;

&lt;p&gt;Microservice - Developers can easily design microservice architectures with Node.js. Furthermore, they can use tools to generate fully functional services based on Typescript and Node.js with popular technologies such as (but not limited to) NestJS, Prisma, PostgreSQL, GraphQL, and MongoDB.&lt;/p&gt;

&lt;p&gt;Cross-platform application development - Can be used for desktop application development with Electron.&lt;/p&gt;

&lt;p&gt;IoT - Perfect for building applications requiring real-time communications.&lt;/p&gt;

&lt;p&gt;Single page applications - Works well with frontend frameworks like Angular, React, and Vue.js.&lt;/p&gt;

&lt;p&gt;Pros of Node.js Development&lt;/p&gt;

&lt;p&gt;Node.js is excellent for high-performance applications since it is built on the V8 JavaScript engine.&lt;/p&gt;

&lt;p&gt;Highly scalable since its event-loop mechanism helps to process requests non-blocking.&lt;/p&gt;

&lt;p&gt;Simplifies web development by allowing developers to use JavaScript for both frontend and backend development.&lt;/p&gt;

&lt;p&gt;Huge active user community.&lt;/p&gt;

&lt;p&gt;Cost-effective since Node.js is open-source.&lt;/p&gt;

&lt;p&gt;Easy integrations with other development tools and technologies like Express, AWS, Socket IO, MongoDB, etc.&lt;/p&gt;

&lt;p&gt;Cons of Node.js Development&lt;/p&gt;

&lt;p&gt;Using too many callbacks to write asynchronous code can cause callback hell.&lt;/p&gt;

&lt;p&gt;Node.js is not designed to handle CPU-intensive tasks like video encoding, data encryption, or scientific computing.&lt;/p&gt;

&lt;p&gt;Developers need to take extra measures to increase the security of their applications.&lt;/p&gt;

&lt;p&gt;There are difficulties in debugging due to asynchronous control flow.&lt;/p&gt;

&lt;p&gt;NPM dependencies are hard to manage - some packages are not stable or not well documented or might have security issues. In addition, project size grows unexpectedly with nested dependencies.&lt;/p&gt;

&lt;p&gt;How to Install Node.js&lt;/p&gt;

&lt;p&gt;Installing Node.js is simple and one of the first things developers should do when setting up their machines.&lt;/p&gt;

&lt;p&gt;Step 1 - Download the latest LTS Node.js version from their webpage. Make sure to select the appropriate installer based on your operating system.&lt;/p&gt;

&lt;p&gt;Step 2 - Run the installer file and follow the installation wizard.&lt;/p&gt;

&lt;p&gt;Step 3 - After the wizard completes, open the CMD and type node -v to verify the installation. It will log the Node.js version you installed. (e.g., v18.12.0)&lt;/p&gt;

&lt;p&gt;FAQs&lt;/p&gt;

&lt;p&gt;Q1: What is the difference between Node.js and Angular/AngularJS?&lt;/p&gt;

&lt;p&gt;Angular is a JavaScript-based frontend development framework, and AngularJs is the predecessor of Angular. On the other hand, Node.js is a server-side runtime environment that allows developers to run JavaScript code on the server side.&lt;/p&gt;

&lt;p&gt;So, Angular/AngularJS is used to build client-side applications, while Node.js is for server-side development.&lt;/p&gt;

&lt;p&gt;Q2: Why is Node.js popular?&lt;/p&gt;

&lt;p&gt;Node.js is one of the most popular web technologies among developers. The use of JavaScript for server-side development, handling high concurrency, support for building highly scalable and efficient applications, and non-blocking I/O are some of the key reasons behind the popularity of Node.js.&lt;/p&gt;

&lt;p&gt;Q3: Is Node.js a programming language?&lt;/p&gt;

&lt;p&gt;No, Node.js is not a programming language. It is a runtime environment allowing developers to run JavaScript code outside the web browser.&lt;/p&gt;

&lt;p&gt;Q4: Is Node.js a framework?&lt;/p&gt;

&lt;p&gt;No, Node.js is not a framework. It is a runtime environment that provides an environment to run JavaScript code. Node.js is often mistaken as a framework since it includes several core libraries and APIs to help developers build web applications.&lt;/p&gt;

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

&lt;p&gt;Node.js has become one of the most popular web technologies due to its excellent features like non-blocking I/O, event-driven nature, scalability, cross-platform support, and performance. It also has one of the largest developer communities and a wide range of third-party libraries to speed up development.&lt;/p&gt;

&lt;p&gt;However, Node.js is not a silver bullet, and there are some limitations you need to understand. For example, Node.js is unsuitable for CPU-intensive tasks and requires knowledge of asynchronous programming. So, developers must identify their requirements before choosing Node.js as their runtime environment.&lt;/p&gt;

&lt;p&gt;I hope this article provided a complete overview of Node.js, how it works, its features, and uses cases to help you decide when you should and should not use Node.js.&lt;/p&gt;

&lt;p&gt;I am currently building a newsletter to share informative articles and news, covering ai, startups 🚀, tech 📱, and programming 💻! my progress in becoming Software Developer with little experience, and how you can learn from my experience.&lt;/p&gt;

&lt;p&gt;Please subscribe via this &lt;a href="https://lalitkumawattech.substack.com/"&gt;link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also published here.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Software Deployment Best Practices in 2023</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Sat, 15 Jul 2023 12:06:43 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/software-deployment-best-practices-in-2023-4bn2</link>
      <guid>https://forem.com/lalitkumawat1m/software-deployment-best-practices-in-2023-4bn2</guid>
      <description>&lt;p&gt;Deployment is the day when the software is finally released to the world. &lt;/p&gt;

&lt;p&gt;Yet, as Stackify CEO Matt Watson said, organizations lack confidence in deployment. One of the greatest strengths of agile is the ability to deploy rapidly. However, moving too fast and without following the right processes, one can witness problems like downtime, errors, and poor user experience.  &lt;/p&gt;

&lt;p&gt;In addition, software deployment includes various activities like installing, configuring, testing, and monitoring the performance of newly deployed environments. For instance, there are a few practices for deploying software like A/B testing, Shadow Deployment, Grey Box Testing, Black Box Testing, White Box Testing, etc.&lt;/p&gt;

&lt;p&gt;Here are the best practices that can assist you with an effective software deployment:&lt;/p&gt;

&lt;p&gt;Separate Clusters for Non-Production and Production&lt;br&gt;
Having an enormous cluster often creates problems for security and resource consumption. Therefore it is crucial to have two clusters at the minimum – one for production and another for non-production.&lt;/p&gt;

&lt;p&gt;The Latest DZone Refcard&lt;/p&gt;

&lt;p&gt;The Essentials of GitOps&lt;/p&gt;

&lt;p&gt;Here is how you can separate clusters for production and non-production:&lt;/p&gt;

&lt;p&gt;When using Kubernetes, use the K8 cluster for each environment.&lt;br&gt;
Keep all the clusters in different namespaces.&lt;br&gt;
Give access to the production cluster to fewer people.&lt;br&gt;
Iterate faster to prevent production failure.&lt;br&gt;
Carefully Collect Deployment Metrics&lt;br&gt;
Kubernetes clusters have distributed services that support dynamic software. Therefore, it becomes crucial to have appropriate metrics to enable the applications to adapt to traffic. In addition, metrics can help measure the success of the deployment, enabling continuous monitoring of the performance of an application.&lt;/p&gt;

&lt;p&gt;Follow these ways to collect Kubernetes clusters with ease:&lt;/p&gt;

&lt;p&gt;Deploy Kubernetes cluster to run commands.&lt;br&gt;
Use kubectl get to run commands against Kubernetes clusters and query the metrics API.&lt;br&gt;
Retrieve compact metric snapshots.&lt;br&gt;
Query resource allocations&lt;br&gt;
Employ the Kubernetes dashboard to browse cluster objects.&lt;br&gt;
Implement a Continuous Integration Server&lt;br&gt;
A continuous integration server is software that centralizes all of your integration processes and provides a dependable building environment. In addition, it is highly adaptable and allows you to create different projects for various platforms.&lt;/p&gt;

&lt;p&gt;The most critical consideration when utilizing a CI server is having a clean machine ready for installation. An environment free of excessive tools, environment variables, and other customizations is essential for running the CI server and overall process properly.&lt;/p&gt;

&lt;p&gt;Here are the practices to run a continuous integration smoothly:&lt;/p&gt;

&lt;p&gt;Frequently commit codes&lt;br&gt;
Fix broken builds as soon as possible&lt;br&gt;
Write unit tests&lt;br&gt;
Ensure all tests must be passed&lt;br&gt;
Avoid breaking code&lt;br&gt;
Use of Deployment Checklist&lt;br&gt;
Every task constituting multiple steps seems complex to accomplish unless you have a process. The same goes for deploying new software too. Preparing an app deployment checklist ensures that all the critical tasks are completed with utmost precision. Also, it is a must for one to be aware of the application's KPI.&lt;/p&gt;

&lt;p&gt;Based on the above two parameters, you can make customized checklists for software deployment catered to your team's needs. &lt;/p&gt;

&lt;p&gt;Consider Applying Resource Limits&lt;br&gt;
If you are deploying your application to Kubernetes, there is no resource limiter by default. Without a limiter, your application can consume the entire cluster's resources, disrupting the production cluster's performance. That's why it is crucial to have resource limiters to avoid such circumstances. &lt;/p&gt;

&lt;p&gt;When setting limits, it is important to consider potential traffic and load bursts. Although Kubernetes is known to provide resource elasticity, maintaining a balance is important. Setting the limit too low can lead to application crashes, and setting it too high can make the cluster becomes inefficient.&lt;/p&gt;

&lt;p&gt;Automate Your Deployment Process&lt;br&gt;
Manually deploying can work, but it is not the right way to do it. When a  complex process like deployment is done by hand, it leaves too much room for human error. Automating deployment processes reduces errors and speeds up deployments making the process convenient for your team. &lt;/p&gt;

&lt;p&gt;Automation can be deployed simply by using scripts to deploy specific actions in a specific environment. Many advanced CI/CD tools in the market support automated deployment. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>softwareengineering</category>
      <category>programming</category>
    </item>
    <item>
      <title>Elon Musk launches his new company, xAI</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Sat, 15 Jul 2023 11:44:02 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/elon-musk-launches-his-new-company-xai-d1o</link>
      <guid>https://forem.com/lalitkumawat1m/elon-musk-launches-his-new-company-xai-d1o</guid>
      <description>&lt;p&gt;Elon Musk on Friday said the purpose of his new artificial intelligence company, xAI, will be to "understand the universe."&lt;/p&gt;

&lt;p&gt;In an often meandering 90-minute long Twitter Spaces audio chat, the billionaire discussed his vision for xAI for the first time while veering into topics such as the Earth's evolution and the fragility of civilization.&lt;/p&gt;

&lt;p&gt;In seeking to deepen the understanding of the universe, Musk joked that xAI's mission statement would be "what the hell is really going on?"&lt;/p&gt;

&lt;p&gt;Musk announced the formation of xAI on Wednesday after accusing companies like OpenAI and Google of developing the technology without considering risks to humans.&lt;/p&gt;

&lt;p&gt;OpenAI and Google did not respond to request for comment.&lt;/p&gt;

&lt;p&gt;He said xAI would seek to build a "good AGI," as an alternative to Microsoft, Google and OpenAI. AGI stands for artificial general intelligence and refers to AI that can solve problems like a human.&lt;/p&gt;

&lt;p&gt;During the Spaces session, which had a delayed start as Twitter needed to "tweak the algorithm" to promote the chat to more users, Musk said xAI would work closely with his other companies, Twitter and Tesla.&lt;/p&gt;

&lt;p&gt;The company will use public tweets to train its AI models and may also work with Tesla on AI software.&lt;/p&gt;

&lt;p&gt;Such a relationship would have "mutual benefit" and could accelerate Tesla's work in self-driving capabilities, Musk said.&lt;/p&gt;

&lt;p&gt;He also accused all AI companies of training their models using Twitter data in what he characterized as an illegal manner.&lt;/p&gt;

&lt;p&gt;Musk, who has advocated for regulations in AI, said he has pushed for meetings with White House officials and has emphasized the importance of regulating AI in his recent meetings with top government officials in China.&lt;/p&gt;

&lt;p&gt;I am currently building a newsletter to share informative articles and news, covering ai, startups 🚀, tech 📱, and programming 💻! my progress in becoming Software Developer with little experience, and how you can learn from my experience.&lt;br&gt;
Please subscribe via this &lt;a href="https://lalitkumawattech.substack.com/"&gt;link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also published here.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Optimize your GitHub Repository for Open Source Development ?</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Tue, 11 Jul 2023 08:22:02 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/how-to-optimize-your-github-repository-for-open-source-development--4jof</link>
      <guid>https://forem.com/lalitkumawat1m/how-to-optimize-your-github-repository-for-open-source-development--4jof</guid>
      <description>&lt;p&gt;Contributing to open source can be an awesome experience to help you learn, get job opportunities, network with people and also help others at the same time.&lt;/p&gt;

&lt;p&gt;This article would give you tips to help prepare your GitHub repository for open-source contributions.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is assumed that you have basic experience with markdown syntax to work with most of the files needed in this article.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tips and Tricks&lt;br&gt;
Creating your README&lt;/strong&gt;&lt;br&gt;
The README.md is the entry point to your project when people visit your repository. It should contain:&lt;/p&gt;

&lt;p&gt;the description of the project.&lt;/p&gt;

&lt;p&gt;why the project is useful.&lt;/p&gt;

&lt;p&gt;how to get started.&lt;/p&gt;

&lt;p&gt;relevant information on using the project etc.&lt;/p&gt;

&lt;p&gt;Most projects with short documentation would have the README. I’d recommend the same except the documentation is huge, you need to have it somewhere else that can support search, pagination, etc.&lt;/p&gt;

&lt;p&gt;**Writing your Contribution Guideline&lt;br&gt;
**To create a contribution guideline, create a &lt;a href="http://CONTRIBUTING.md"&gt;CONTRIBUTING.md&lt;/a&gt; at the root of your project and provide information that is necessary for new and old contributors to contribute to your project.&lt;/p&gt;

&lt;p&gt;It can include information like:&lt;/p&gt;

&lt;p&gt;the different ways contributors can contribute to the project.&lt;/p&gt;

&lt;p&gt;how contributors can clone the repository on their local machine.&lt;/p&gt;

&lt;p&gt;how contributors can set up the code on their machine for development.&lt;/p&gt;

&lt;p&gt;how contributors can report bugs.&lt;/p&gt;

&lt;p&gt;**Defining the Code of Conduct&lt;br&gt;
**Working with people can be tasking in some cases and open-source projects are not protected from people with abusive intent. Creating a code of conduct sets a foundation for creating a positive environment for people to contribute without disruption by negative behaviors like sexual harassment, verbal abuse, etc.&lt;/p&gt;

&lt;p&gt;Create a CODE_OF_CONDUCT.md at the root of your project. Using markdown syntax, the file can contain information about:&lt;/p&gt;

&lt;p&gt;the project community pledge,&lt;/p&gt;

&lt;p&gt;the project community standards,&lt;/p&gt;

&lt;p&gt;enforcement guidelines.&lt;/p&gt;

&lt;p&gt;You can adapt the guidelines provided here to create your guideline.&lt;/p&gt;

&lt;p&gt;**Creating Status Checks&lt;br&gt;
**To enforce good development, you can include a form of status check each time a pull request is made to your project. Status check let you know if commits meet the conditions set for the repository. The checks can include continuous integration like:&lt;/p&gt;

&lt;p&gt;**units tests&lt;br&gt;
**code coverage&lt;br&gt;
code quality checks like DeepSource, SonarCloud, etc.&lt;br&gt;
GitHub Actions is recommended to trigger jobs or workflow by certain events on your repository.&lt;/p&gt;

&lt;p&gt;**Protect your Main Branch&lt;br&gt;
**Using GitHub, you need to protect your main branch to enforce that certain requirements are met before pushing to the branch. Protecting the branch can also prevent deletion or force pushes to the branch.&lt;/p&gt;

&lt;p&gt;To set up protection rules for the main/default branch, ensure you have admin access to the repository then click on Settings &amp;gt; Branches and click on Add branch protection rule:&lt;/p&gt;

&lt;p&gt;Then you can configure or select the rules you want active:&lt;/p&gt;

&lt;p&gt;To read more about GitHub branch protection rules, you can visit &lt;a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches?ref=hackernoon.com"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;**Create Pull Request Templates&lt;br&gt;
**To set a foundation for code reviews, you can create a pull request template with sets of required information that you feel is necessary for code review.&lt;/p&gt;

&lt;p&gt;To create the template, create a new directory, called .github, and create a new file in the directory called PULL_REQUEST_TEMPLATE.md.&lt;/p&gt;

&lt;p&gt;A sample template could look like this:&lt;/p&gt;

&lt;h2&gt;
  
  
  Description
&lt;/h2&gt;

&lt;p&gt;Issue closed #(issue)&lt;/p&gt;

&lt;h2&gt;
  
  
  Change Type
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Bug fix &lt;/li&gt;
&lt;li&gt;[ ] New feature&lt;/li&gt;
&lt;li&gt;[ ] Breaking change&lt;/li&gt;
&lt;li&gt;[ ] Minor changes in old functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] My changes are well-tested and commented&lt;/li&gt;
&lt;li&gt;[ ] I reviewed my changes&lt;/li&gt;
&lt;li&gt;[ ] My changes generate no new warnings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**Make Use of GitHub Labels&lt;br&gt;
**You can utilize GitHub Labels to help create a standard workflow in a repository. You can use labels to categorize issues, pull requests, and discussions.&lt;/p&gt;

&lt;p&gt;GitHub provides defaults labels with their description, some of which includes:&lt;/p&gt;

&lt;p&gt;bug: indicates an unexpected problem or unintended behavior.&lt;br&gt;
documentation: indicates a need for improvements or additions to documentation.&lt;br&gt;
duplicate: indicates similar issues, pull requests, or discussions.&lt;br&gt;
enhancement: indicates a new feature request.&lt;br&gt;
good first issue: indicates a good issue for first-time contributors.&lt;br&gt;
help wanted: indicates that a maintainer wants help on an issue or a pull request. etc&lt;/p&gt;

&lt;p&gt;To read more about GitHub Labels, you can visit this documentation.&lt;/p&gt;

&lt;p&gt;**Create Templates for Issues&lt;br&gt;
**Once contributors start noticing and using your project, it is very likely for a number of issues to be created on your repository.&lt;/p&gt;

&lt;p&gt;At the time of writing this article, Typescript has over 5000 issues in its repository.&lt;/p&gt;

&lt;p&gt;Creating templates for issues is a great way to organize issues in your repository.&lt;/p&gt;

&lt;p&gt;To create these templates, create a directory named, ISSUE_TEMPLATE, in the .github directory which is at the root of your project. Then create a new markdown file directly to create separate templates.&lt;/p&gt;

&lt;p&gt;I will create a sample feature request template in a file called feature_template.md:&lt;/p&gt;




&lt;p&gt;name: Feature Request&lt;br&gt;
about: Suggest a new idea for this project&lt;/p&gt;

&lt;h2&gt;
  
  
  labels: enhancement
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Viability Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] this wouldn't be breaking change in existing JavaScript&lt;/li&gt;
&lt;li&gt;[ ] this will not change the runtime environment&lt;/li&gt;
&lt;li&gt;[ ] this feature can be implemented with JavaScript&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Suggestion
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Use Case
&lt;/h2&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Open source is not restricted to writing codes alone. You can help with documentation, help share and talk about the project with your friends, help with product designs, and many more. I hope this article is able to get some guidelines that can help you get started in your next open-source project.&lt;/p&gt;

&lt;p&gt;I am currently building a newsletter to share informative articles and news, my progress in creating startups with little experience, and how you can learn from my experience.&lt;/p&gt;

&lt;p&gt;Please subscribe via this &lt;a href="https://lalitkumawattech.substack.com/"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also published here.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>10 Advanced Git Commands</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Tue, 11 Jul 2023 06:55:53 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/10-advanced-git-commands-3b8g</link>
      <guid>https://forem.com/lalitkumawat1m/10-advanced-git-commands-3b8g</guid>
      <description>&lt;p&gt;For many developers, truly harnessing the power of Git can be a daunting task. Git can seem intimidating when you first start using it. This is one of the reasons most developers limit themselves to using the standard push, pull, and merge commands.&lt;/p&gt;

&lt;p&gt;However, over the years, Git has emerged as the standard tool for version control because of how powerful it is. So if you’re using Git on a regular basis, then you can vastly improve your workflow by learning some of these advanced features.&lt;/p&gt;

&lt;p&gt;In this article, I’ll discuss ten advanced Git commands every developer should know.&lt;/p&gt;

&lt;p&gt;Top&lt;br&gt;
Git Rebase&lt;br&gt;
If you wanted to merge all your commits in a feature branch to the main branch, what probably comes to mind is using the git merge command. This will take all of the changes in the featured branch and stuff it into one merge commit and then put that merge commit into the main branch. After those changes are combined into that merge commit, it looks scattered, especially when you have a bunch of people working on the featured branch and pushing changes almost every time.&lt;/p&gt;

&lt;p&gt;using git merge&lt;br&gt;
The git rebase command can solve that for us. It takes all of your commits from a featured branch and moves them on top of the main commit.&lt;/p&gt;

&lt;p&gt;git rebase&lt;br&gt;
A great advantage is that it easily traces your commits inside the main branch.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git rebase &lt;br&gt;
You should use the git rebase command to consolidate into a single branch when you have multiple private branches. And it will display the commit history in a linear form. In a linear history, it’s easy to see the progression of changes because they are all applied one after the other, without any branches or merge commits. This can make it easier to understand how the code evolved over time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Additionally, a linear history can make it easier to track down bugs because you can more easily see when a particular change was introduced. It can also make it easier to revert changes since you can simply revert a single commit rather than dealing with the complexity of merging branches.&lt;/p&gt;

&lt;p&gt;Searching a Git Repo&lt;br&gt;
Have you ever wanted to search for a string in your repository history? Well, you can do that now with the grep command, which helps you search for a specific string inside all the commits (the entire history of the project).&lt;/p&gt;

&lt;p&gt;Git Grep&lt;br&gt;
git grep is a useful tool for quickly searching through the codebase of a Git repository to find specific information searches through the tracked files in the current branch of a Git repository and returns a list of lines that match the specified pattern. It can be used to search for code snippets, function calls, or specific strings of text.&lt;/p&gt;

&lt;p&gt;To search through files in your working directory (current project state) you can make use git grep :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git grep STRING&lt;br&gt;
Here’s an example of searching for the word “blockchain” in a web3 repository:&lt;/p&gt;

&lt;p&gt;_git grep blockchain&lt;br&gt;
Here’s the result:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;searching for the word blockchain&lt;br&gt;
Git Rev-List&lt;br&gt;
You can also perform complex searches by adding the git rev-list. To understand how to do this, let’s take a brief look at the git rev-list&lt;/p&gt;

&lt;p&gt;The git rev-list is a Git command used to list the revisions in a Git repository. It provides a list of all the commit objects in the repository, including the commit hash, author, date, and message, sorted in reverse chronological order. The output of the git rev-list command can be used to display the commit history, track the progression of a Git repository over time, or perform various operations on the commits.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git rev-list [OPTIONS] []&lt;br&gt;
Here,OPTIONS is a list of optional parameters that control the output of the git rev-list command, and  is a list of revisions that you want to list.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example, to list all the revisions in the repository, you can run:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git rev-list --all&lt;br&gt;
To list the revisions reachable from the current branch, you can run:&lt;/p&gt;

&lt;p&gt;_git rev-list HEAD&lt;br&gt;
To list the revisions between two branches, you can run:&lt;/p&gt;

&lt;p&gt;_git rev-list branch1..branch2&lt;br&gt;
You can use the git rev-list command in combination with other Git commands, such as xargs and git grep, to perform more complex searches.&lt;/p&gt;

&lt;p&gt;_&lt;br&gt;
git rev-list –all | xargs git grep -F ''&lt;br&gt;
Using xargs is useful in this case because it takes the output of the git rev-list command, which is a list of all revisions in the Git repository, and passes each revision as an argument to the git grep command, so that the contents of each revision can be searched for the specified string.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You just have to replace the  with the string you want to search for:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_&lt;br&gt;
git rev-list --all | xargs git grep -F 'test'&lt;br&gt;
This will search for the word ‘test’ and display the results.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here’s the result:&lt;/p&gt;

&lt;p&gt;searching the word ‘test’&lt;br&gt;
Git Log&lt;br&gt;
The git log command is one of the most useful Git commands you should be familiar with. When you need to look at your commit history, you use the git log command. The git log command displays the most recent commits as well as the current state of the HEAD.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git log&lt;br&gt;
In the images below, you can see a log or history of the commits made so far.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;git log&lt;br&gt;
Notice that each commit includes a unique sha-id created by the SHA algorithm. It also includes the date, time, author, and other information.&lt;/p&gt;

&lt;p&gt;You can scroll through your log history by pressing the k key to move up and the j key to move down. Press q to exit.&lt;/p&gt;

&lt;p&gt;You can also view your logs as a graph just by adding the --graph option:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git log --graph&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;git log graph&lt;br&gt;
Git Diff&lt;br&gt;
Comparing changes you made between two files or branches before committing or pushing is helpful as it allows you to review your changes and make sure they are ready to be shared with others. This can help you catch mistakes or unintended changes before they are committed to the repository, which can save time and reduce the risk of introducing problems.&lt;/p&gt;

&lt;p&gt;Thankfully, with git diff, you can do that. It lets you see what has changed between two branches, commits, and files.&lt;/p&gt;

&lt;p&gt;Git Diff to Compare Files&lt;br&gt;
To check the working directory against the local repository:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git diff &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;git diff&lt;br&gt;
This will show the differences between the file you are currently working on and the version in the last commit. The output will show a list of changes, with added or modified lines highlighted in green.&lt;/p&gt;

&lt;p&gt;Git Diff to Compare Branches&lt;br&gt;
To see the differences between two branches:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git diff branch1 -- branch2&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;difference between two branches&lt;br&gt;
This will show the differences between the two specified branches. The output will show a list of changes for each file that has differences between the two branches, with added or modified lines highlighted in green.&lt;/p&gt;

&lt;p&gt;Git Diff to Compare Commits&lt;br&gt;
To see the differences between two specific commits:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git diff commit1 commit2&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;difference between two commits&lt;br&gt;
This will show the differences between commit1 and commit2. The output will show a list of changes for each file that has differences between the two commits, with lines that were added or modified highlighted in green.&lt;/p&gt;

&lt;p&gt;Git Reflog&lt;br&gt;
Reflog is another simple but useful command. The term reflog refers to reference logs.&lt;/p&gt;

&lt;p&gt;Git Log vs Git Reflog&lt;br&gt;
Unlike the git log command which provides a history of the changes to the contents of the repository, the git reflog command provides a history of all updates to the references in a Git repository.&lt;/p&gt;

&lt;p&gt;This command displays the most recent commits, pulls, resets, pushes, and so on your local machine. It allows you to return to any commit, even if a branch or tag doesn’t reference it.&lt;/p&gt;

&lt;p&gt;The reflog retains information about the previous status of branches and allows them to be restored if necessary. This is an excellent method for tracking down any issues like lost commits, debugging problems, e.t.c that may have arisen and determining what you did to cause those issues.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git reflog&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;git reflog&lt;br&gt;
Git Revert&lt;br&gt;
The revert command allows you to undo changes made to a repository’s commit history on the current branch.&lt;/p&gt;

&lt;p&gt;To use git revert, Simply give the commit you wish to reverse to the command, and it will undo all modifications made since that commit.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git revert &lt;br&gt;
One thing to remember is that this only undoes changes from that specific commit. If you revert a month-old commit, it will not remove any modifications done since that point. It will only undo the changes made in that specific commit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Another thing to remember is that using git revert does not truly erase the previous commit. Instead, it generates a new commit that undoes all of the modifications made in the previous commit. This is beneficial since it preserves the history of your repository.&lt;/p&gt;

&lt;p&gt;You can also use this if you want to revert the latest commit:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git revert HEAD&lt;br&gt;
Git Prune&lt;br&gt;
git prune removes stale or dormant objects from a git repository. Stale object can be a branch or tag that is deleted, or a commit that is amended or rebased. In Git, a stale object becomes unreferenced and unreachable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Git prune acts as a trash can for unused data in the git repository history. This function is an offspring of the garbage collection command and is not immediately executed. The git garbage collection command (gc) is in charge of keeping a repository alive. It clears out all the clutter in a repository and keeps it clean.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_&lt;br&gt;
git prune &amp;lt; --dry-run&amp;gt;| &amp;lt;-v&amp;gt; | &amp;lt;--progress&amp;gt; \&lt;br&gt;
|&amp;lt;--expire &lt;time&gt; |&amp;lt;-- &amp;gt; |…&lt;br&gt;
--dry-run: doesn’t execute the prune but rather lists what it will remove&lt;br&gt;
-v (--verbose): displays the output of pruned data and actions&lt;br&gt;
--progress: displays output indicating the prune’s progress&lt;br&gt;
--expire &lt;time&gt;: specifies when the wasted objects will expire&lt;br&gt;
…: specifies the options that are referenced from the commit’s head&lt;br&gt;
Git Stash&lt;br&gt;
git stash allows you to temporarily save changes that you have made to your working copy so that you can switch to a different branch, pull in upstream changes, and switch back to your original branch, at which point you can apply the saved changes.&lt;/time&gt;&lt;/time&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It works by keeping or saving all of your uncommitted changes while also cleaning up your working tree. Stashing is helpful for you if you need to move away from what you are doing, say to fix an urgent bug, but aren’t quite ready to commit what you’ve done so far.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git stash&lt;br&gt;
This simple command saves all your code modifications but does not commit them. Instead, it saves them locally on your computer. When you’re ready to continue, you can pull your changes from the stash with this command below:&lt;/p&gt;

&lt;p&gt;_git stash pop&lt;br&gt;
Git Tag&lt;br&gt;
Tags are references that point to specific commits. Tagging is generally used to capture a point in history that is used for a marked version release (i.e. v1.0.0). By default, tags are not transitive, meaning they don’t move when new commits are added. A Git tag is similar to a branch that won’t change, although, unlike branches, tags have no further history of commits after they are established.&lt;/p&gt;

&lt;p&gt;_git tag &lt;br&gt;
For example, if you want to create a new tag named v1.0.0, you can use the following command:&lt;/p&gt;

&lt;p&gt;_git tag v1.0.0&lt;br&gt;
This will create a new tag at the current commit. If you want to create a tag for a specific commit, you can specify the commit hash:&lt;/p&gt;

&lt;p&gt;_git tag v1.0.0 &lt;br&gt;
You can also use the -a flag to annotate the tag with a message:&lt;/p&gt;

&lt;p&gt;_git tag -a v1.0.0 -m "Release version 1.0.0"&lt;br&gt;
To push the tags to a remote repository, you can use the git push command with the --tags flag:&lt;/p&gt;

&lt;p&gt;_git push --tags&lt;br&gt;
This will push all of your local tags to the remote repository. To view the list of tags you made in your repository:&lt;/p&gt;

&lt;p&gt;_git tag --list&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;tag list&lt;br&gt;
Git Clean&lt;br&gt;
You can use the git clean command to deal with untracked files. It functions differently from the git checkout and git reset, which work on files that have already been added to the Git tracking index. This command removes all untracked files from your working directory.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git clean&lt;br&gt;
The git clean command requires you to use either the -f or -n flag when running it. If you don’t use either of these flags, the command will fail with an error message similar to “no f’s given”. For example, if you try to run git clean without any flags, you might see an error message like this:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;error message&lt;br&gt;
Let’s take a closer look at some of these flags used alongside git clean:&lt;/p&gt;

&lt;p&gt;git clean -n&lt;br&gt;
git clean -n: The -n flag is used to show a dry run of the command, which means it will display the files and directories that would be removed, but it won’t actually remove them.&lt;/p&gt;

&lt;p&gt;Here’s an example, using the -n flag:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git clean -n&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;git clean dry&lt;br&gt;
As we can see, it is displaying the file that would be removed.&lt;/p&gt;

&lt;p&gt;git clean -f&lt;br&gt;
git clean -f: This flag is used to force the removal of untracked files and directories from your Git repository.&lt;/p&gt;

&lt;p&gt;Here’s an example, using the -f flag`:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git clean -f&lt;br&gt;
Here’s a screenshot of the result:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;git clean force&lt;br&gt;
The command forcibly removes the text.txt file&lt;/p&gt;

&lt;p&gt;git clean -f -d&lt;br&gt;
git clean -f -d: This combination of flags will forcefully remove untracked directories from your Git repository, but it will not remove any untracked files.&lt;/p&gt;

&lt;p&gt;Here’s an example, using the -f -d flag:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_git clean -f -d&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;git clean force directories&lt;br&gt;
The command forcefully removes the untracked directories in our example.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Git is a very powerful collaboration tool. If all you ever learn is push, pull, and merge, you can still go far. But mastering Git is worth the effort. It can increase your productivity and improve the quality of your collaborations with other developers.&lt;/p&gt;

&lt;p&gt;The commands covered in this tutorial are just the start. There are many more. You might want to check out Git aliases and git bisect, and other interesting commands.&lt;/p&gt;

&lt;p&gt;That’s it for today!&lt;br&gt;
Do us a favor and let us know you made it this far with a like 💙 &amp;amp; Connect with us via newsletter - &lt;a href="https://lalitkumawattech.substack.com/"&gt;Lalit Kumawat Tech&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading,&lt;/p&gt;

&lt;p&gt;Lalit Kumawat&lt;/p&gt;

</description>
      <category>git</category>
      <category>opensource</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why is GitHub not Open-Source?</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Tue, 11 Jul 2023 06:01:56 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/why-is-github-not-open-source-1lm1</link>
      <guid>https://forem.com/lalitkumawat1m/why-is-github-not-open-source-1lm1</guid>
      <description>&lt;p&gt;GitHub, a widely popular platform for developers, has revolutionized the way code is shared, collaborated on, and managed. However, despite its commitment to open-source software, GitHub itself is not open-source. In a recent interview with Zach Holman, an engineer who worked at GitHub for five years and later advised GitLab, we gain insights into the factors that contributed to GitHub's success, its approach to building a developer community, and the decision to keep the platform closed-source. Let's explore the key takeaways from this conversation.&lt;/p&gt;

&lt;p&gt;Timing and Building a Developer Community&lt;/p&gt;

&lt;p&gt;One of the significant factors that played a crucial role in GitHub's success was timing. Zach Holman emphasizes the importance of seizing the right moment to launch a product. GitHub's founders had a deep understanding of the Ruby community, which allowed them to build a strong initial user base. By capturing the attention of influential developers and providing a valuable platform, GitHub started gaining traction organically.&lt;/p&gt;

&lt;p&gt;Culture and Developer Evangelism&lt;/p&gt;

&lt;p&gt;Zach Holman sheds light on the role of culture and developer evangelism in GitHub's growth. GitHub embraced an open-source approach internally, modeling itself after successful open-source projects. This approach fostered a culture of collaboration and transparency, resonating with developers worldwide. Zach Holman played a pivotal role in promoting this culture through conference talks and advocating for the open-source way of working.&lt;/p&gt;

&lt;p&gt;Transitioning to a Larger Organization&lt;/p&gt;

&lt;p&gt;As GitHub grew from a small team to a company of 250 employees, it faced unique challenges in maintaining its culture. The addition of managers and the need for more structured processes became inevitable. Zach acknowledges that scaling the company culture while maintaining productivity and innovation was a complex task. The transition from a managerless organization to one with a hierarchical structure required careful implementation and adjustments.&lt;/p&gt;

&lt;p&gt;The Open-Source Dilemma&lt;/p&gt;

&lt;p&gt;The decision to keep GitHub itself closed-source, despite its focus on open-source software, was a subject of ongoing discussion within the company. Zach Holman acknowledges the merits of both approaches. While open-sourcing aspects of the product can promote transparency and community collaboration, it also presents challenges in managing contributions, dealing with potential negativity, and maintaining a competitive advantage. GitHub's experience and exposure to various scenarios influenced the team's perspective on open-sourcing their entire product.&lt;/p&gt;

&lt;p&gt;GitHub vs. GitLab: Differences and Perspectives&lt;/p&gt;

&lt;p&gt;Having also advised GitLab, another prominent platform for developers, Zach Holman provides insights into the significant differences between the two companies. GitLab's strong commitment to open-source principles and its transparent decision-making processes set it apart. Zach acknowledges that GitLab's open-sourceness has a significant impact on its culture and product development pace. However, he emphasizes that both GitHub and GitLab have found success by employing different approaches, proving that there isn't a single correct path.&lt;/p&gt;

&lt;p&gt;Transitioning from Engineering to Angel Investing&lt;/p&gt;

&lt;p&gt;Zach Holman's journey from engineering at GitHub to angel investing brings a unique perspective to the discussion. He highlights the advantage of having technical knowledge when investing in tech companies. By advising and investing in different startups, Zach gained valuable insights into diverse industries, broadening his perspective. Investing became an extension of his advisory role, allowing him to leverage his experience to make informed decisions.&lt;/p&gt;

&lt;p&gt;Wrapping up&lt;/p&gt;

&lt;p&gt;The interview with Zach Holman provides valuable insights into the growth of GitHub, the challenges of scaling company culture, and the decision-making process behind keeping the platform closed-source. GitHub's success can be attributed to factors such as perfect timing, a strong developer community, and an open-source culture. While GitHub remains closed-source, the conversation also highlights the merits of open-sourcing aspects of a product. Ultimately, the success of platforms like GitHub and GitLab showcases that different approaches can lead to remarkable achievements in the developer community.&lt;/p&gt;

&lt;p&gt;That’s it for today!&lt;br&gt;
Do us a favor and let us know you made it this far with a like 💙 &amp;amp; Connect with us via newsletter - &lt;a href="https://lalitkumawattech.substack.com/"&gt;Lalit Kumawat Tech&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lalit Kumawat&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>github</category>
      <category>webdev</category>
    </item>
    <item>
      <title>AI is Killing Remote Work</title>
      <dc:creator>Lalit Kumawat</dc:creator>
      <pubDate>Sun, 09 Jul 2023 01:30:00 +0000</pubDate>
      <link>https://forem.com/lalitkumawat1m/ai-is-killing-remote-work-2emn</link>
      <guid>https://forem.com/lalitkumawat1m/ai-is-killing-remote-work-2emn</guid>
      <description>&lt;p&gt;In 2020 and 2021, many a breathless think-piece was written about the Future of Work. The Old World was never coming back, and we all had to adapt to the reality forced upon us by COVID, or be left behind.&lt;/p&gt;

&lt;p&gt;Visions tended to vary, but most agreed: Work from Home was here to stay. How could we ever go back to cubicles after a once-in-a-century plague forced us to take stock of work-life balance’s importance?&lt;/p&gt;

&lt;p&gt;Oh how we were wrong. Amazon, Goldman Sachs, Disney, Dell… so many companies have asked employees to come back to the office over the past months that it may be easier to name the ones that haven’t done so (Airbnb? Coinbase?).&lt;/p&gt;

&lt;p&gt;Employees have fought back, but the fight is not long for this world. They will all come back of their own volition. And the rise of General Artificial Intelligence is at fault.&lt;/p&gt;

&lt;p&gt;As we witness AI becoming proficient in the ways of mundane corporate work (making presentations, helping clients, generating financial reports…), we get more anxious about our replaceability. We ask ourselves “What can I do that can’t be automated?” “How can I make sure I come out on top of this technological revolution?”&lt;/p&gt;

&lt;p&gt;Sure, we crack jokes with our colleagues about the mistakes ChatGPT makes. We write sarcastic little Tweets saying “Our jobs are safe, fam”. But we’re all asking these same questions. We’re scared.&lt;/p&gt;

&lt;p&gt;The smartest among us will have realized that the talents still unique to humanity are interpersonal and best exercised in-person. Collaboration. Leadership. Creativity. Brainstorming. All matters of soft skills. In fact, work that can’t be automated is the personality you bring to the office. No amount of technology seems to be able to replace this… because it can only happen organically.&lt;/p&gt;

&lt;p&gt;And so, as white-collar jobs get increasingly automated, workers will willingly go back to the office, where they can show that they’re more than three ChatGPTs in a trench coat. And those people will be the ones to survive and get promoted; show me work you can produce alone at home and I will show you work that can be off-shored and/or automated.&lt;/p&gt;

&lt;p&gt;Remote work was a zero-interest-rate phenomenon. That world is dead.&lt;/p&gt;

&lt;p&gt;That’s not to say this is a positive. Work-from-home allowed flexibility that many benefited from. The ability to be at the office from 8 to 8 is, after all a privilege — in a twisted, capitalist way. But the world is changing, and togetherness is where the value is now.&lt;/p&gt;

&lt;p&gt;As we experience the five stages of grief for a world some of us feel we no longer have a place in, there is still time to improve the corporate hellscape we are all going back to for fear of being left behind.&lt;/p&gt;

&lt;p&gt;Instead of thriving for work-life balance, we can use AI and automation to make the “Work-Life Integration” concept come to life. Technological innovation can make some work happen anywhere, at any time, while other tasks can only be completed through in-person collaboration.&lt;/p&gt;

&lt;p&gt;Allowing employees to desperately organize both types of work around their daily lives will be key to employee retention. That sounds a lot like “hybrid work”… but that concept does not go far enough. If teams want to meet at a restaurant or in a park at 9 pm (after spending quality family time) to brainstorm, let them!&lt;/p&gt;

&lt;p&gt;This leads us to the concept of physical workspaces. They need to be reimagined. The cubicle is dead. Office towers are next. 15-minute cities have already been prophesied… and need to include 15-minute offices: spaces near the home where quality organic work can happen for a short while. And I don’t mean WeWorks. Those should remain buried.&lt;/p&gt;

&lt;p&gt;Remote work is dead. It doesn’t mean the Old World is not equally so. We can evolve. We can do better.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>remote</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
