<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kushagra Kesav on Medium]]></title>
        <description><![CDATA[Stories by Kushagra Kesav on Medium]]></description>
        <link>https://medium.com/@imkushagra?source=rss-35e4f8134661------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*q-1RLEa25qxtUcDlupXBWQ.png</url>
            <title>Stories by Kushagra Kesav on Medium</title>
            <link>https://medium.com/@imkushagra?source=rss-35e4f8134661------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 04:41:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@imkushagra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding the Basics of Stream Processing]]></title>
            <link>https://medium.com/codex/understanding-the-basics-of-stream-processing-fdeda16ebb91?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdeda16ebb91</guid>
            <category><![CDATA[table]]></category>
            <category><![CDATA[kafka-streams]]></category>
            <category><![CDATA[stream-processing]]></category>
            <category><![CDATA[apache-kafka]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Sun, 28 Jul 2024 06:41:49 GMT</pubDate>
            <atom:updated>2024-07-29T13:07:27.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*cjxNVG9_07QZfLmQ_3ofFA.jpeg" /><figcaption>(Blue Planet Studio/Shutterstock)</figcaption></figure><p>In this article, we’ll understand some fundamental concepts of stream processing that are essential for anyone looking to learn about it. Whether you’re new to stream processing or seeking a refresher, here’s a concise overview of what I’ve learned:</p><h3>Fundamentals of Stream Processing</h3><p>Stream processing revolves around three core concepts:</p><ul><li><strong>Events</strong></li><li><strong>Event Streams</strong></li><li><strong>Tables</strong></li></ul><h3>1. Events</h3><p>An event is a discrete piece of data that records an action representing something that has happened. For examples:</p><ul><li>A rendering is completed</li><li>A user submitted a form</li><li>An order is placed</li></ul><p>Events can also be referred to as <strong>records</strong> or <strong>messages</strong>. They serve as the building blocks for data operations and are crucial for tracking and responding to changes in real-time.</p><h3>2. Event Streams</h3><p>An event stream is essentially a sequence of <strong>events</strong> recorded over time. It provides a chronological record of all the events that have occurred. For example, consider the lifecycle of an order:</p><ul><li>Order placed</li><li>Order packed</li><li>Order shipped</li><li>Order in transit</li><li>Order delivered</li></ul><p>Each of these stages represents an event in the stream, capturing the progression from order placing to completion.</p><h3>3. Tables</h3><p>In contrast to event streams, <strong>tables</strong> represent the state of data at a specific point in time. They are static snapshots of data, allowing us to view the most current state. For example, in the order process, it would store the final status as “delivered” (<em>most recent status of each entity</em>).</p><p>Tables are particularly useful for querying and analysing the current state of our data, providing a clear picture of what’s happening at any given point of time.</p><h3>Operations</h3><p>The operations we can perform differ between event streams and tables:</p><ul><li><strong>Event Streams:</strong> Here the operations are limited to insert only. This makes sense as streams are designed to capture continuous data. We can not modify or delete past events.</li><li><strong>Tables:</strong> Here we have the flexibility to perform various operations, such as inserting, updating, and deleting records. This allows us to query and analyse the data at any given point of time.</li></ul><h3>Transformations</h3><p>One of the powerful aspects of stream processing is the ability to transform data between streams and tables also know as <strong>Stream-table duality</strong>.</p><ul><li><strong>Stream to Table:</strong> You can aggregate an <strong>event</strong> stream to produce a <strong>table</strong>. For instance, using SQL functions like COUNT() or SUM(), you can summarize data from the stream into a table format.</li><li><strong>Table to Stream:</strong> Conversely, changes made to a <strong>table</strong> can be streamed out to reflect updates in real-time. This process is often called <a href="https://en.wikipedia.org/wiki/Change_data_capture"><em>change data capture(CDC)</em></a>.</li></ul><blockquote>In fact, we can say that a table is fully defined by its underlying change stream. As new events occur, the table will continuously update itself.</blockquote><p>Stream processing is a dynamic and powerful functionality to handle real-time data, whether you’re building real-time analytics systems or managing data pipelines, understanding these basics will provide a strong foundation for more advanced techniques and applications.</p><blockquote>Feel free to dive deeper into each of these topics and explore how they can be applied to your own projects!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdeda16ebb91" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/understanding-the-basics-of-stream-processing-fdeda16ebb91">Understanding the Basics of Stream Processing</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generate Unique IDs for Nested Arrays in MongoDB using Node.js]]></title>
            <link>https://medium.com/codex/generate-unique-ids-for-nested-arrays-in-mongodb-using-node-js-7a4718b04b15?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a4718b04b15</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[arrays]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Tue, 25 Apr 2023 17:16:09 GMT</pubDate>
            <atom:updated>2023-04-27T20:06:35.721Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MO0iNKCQ2OytthWIFkJ_Qg.png" /><figcaption>Nested JSON Objects</figcaption></figure><p>When working with MongoDB, you might find yourself dealing with complex documents that contain nested arrays of data. In some cases, you might need to generate unique identifiers for the elements in these arrays, so that you can easily reference them and perform operations on them.</p><p>In this article, we will explore how to generate unique IDs (<a href="https://www.mongodb.com/docs/manual/reference/method/ObjectId/"><em>ObjectId</em></a>) for nested arrays in MongoDB using Node.js and the MongoDB driver.</p><p>To follow along with this tutorial, you will need to have the following installed on your computer:</p><ul><li>Node.js</li><li>MongoDB</li><li>The MongoDB driver for Node.js (you can install this using the npm package manager) <em>npm install mongodb</em></li></ul><p>Once you have these dependencies installed, you can start writing the code.</p><h4><strong>Creating the Document</strong></h4><p>Let’s start by creating a sample document that we can use to demonstrate how to generate unique IDs for elements in nested arrays. Here’s an example of what the document might look like:</p><pre>{<br>  &quot;_id&quot;: ObjectId(&quot;6141d4ea6af92531f3e174e1&quot;),<br>  &quot;property&quot;: &quot;value&quot;,<br>  &quot;pets&quot;: [<br>    {<br>      &quot;dogs&quot;: [<br>        { &quot;name&quot;: &quot;Rufus&quot; },<br>        { &quot;name&quot;: &quot;Buddy&quot; }<br>      ],<br>      &quot;cats&quot;: [<br>        { &quot;name&quot;: &quot;Whiskers&quot; },<br>        { &quot;name&quot;: &quot;Fluffy&quot; }<br>      ]<br>    }<br>  ]<br>}</pre><p>This document has an _id field, a property field, and a nested array of pets. Each pet has its own nested array of dogs and cats, which we will use to generate unique IDs.</p><h4><strong>Generating Unique IDs</strong></h4><p>Now that we have our sample document, let’s write the query/code to generate unique IDs for the elements in the dogs and cats arrays.</p><p>To generate unique IDs, we first attempted to use an update query in the <a href="https://www.mongodb.com/docs/v4.4/mongo/"><em>mongo shell</em></a></p><pre>db.a.updateMany(<br>  { animals: { $ne: [] } },<br>       {<br>          $set: {<br>            &#39;animals.$[].cats.$[]._id&#39;: new ObjectId(),<br>            &#39;animals.$[].dogs.$[]._id&#39;: new ObjectId()<br>          }<br>       }<br> );</pre><p>But it resulted in the same <em>_id</em> being created for all elements in the “<em>dogs”</em> and “<em>cats”</em> arrays respectively.</p><p>Therefore, we will now write JavaScript code to generate unique IDs for each element in the respective nested arrays using <em>forEach </em>loop.</p><pre>const { MongoClient, ObjectId } = require(&#39;mongodb&#39;);<br><br>const uri = &#39;mongodb://localhost:27017&#39;;<br>const client = new MongoClient(uri);<br><br>async function generateUniqueIds() {<br>    try {<br>        await client.connect();<br><br>        const db = client.db(&#39;myDatabase&#39;);<br>        const collection = db.collection(&#39;myCollection&#39;);<br><br>        const pets = await collection.find({ pets: { $ne: [] } }).toArray();<br><br>        const bulkWriteOperations = [];<br><br>        pets.forEach(pet =&gt; {<br>            pet.pets.forEach(({ cats, dogs }) =&gt; {<br>                cats.forEach(cat =&gt; {<br>                    bulkWriteOperations.push({<br>                        updateOne: {<br>                            filter: { _id: pet._id, &#39;pets.cats.name&#39;: cat.name },<br>                            update: { $set: { &#39;pets.$[i].cats.$[j]._id&#39;: new ObjectId() } },<br>                            arrayFilters: [{ &#39;i.cats.name&#39;: cat.name }, { &#39;j.name&#39;: cat.name }]<br>                        }<br>                    });<br>                });<br><br>                dogs.forEach(dog =&gt; {<br>                    bulkWriteOperations.push({<br>                        updateOne: {<br>                            filter: { _id: pet._id, &#39;pets.dogs.name&#39;: dog.name },<br>                            update: { $set: { &#39;pets.$[i].dogs.$[j]._id&#39;: new ObjectId() } },<br>                            arrayFilters: [{ &#39;i.dogs.name&#39;: dog.name }, { &#39;j.name&#39;: dog.name }]<br>                        }<br>                    });<br>                });<br>            });<br>        });<br><br>        const result = await collection.bulkWrite(bulkWriteOperations);<br>        console.log(`${result.modifiedCount} documents updated`);<br>    } catch (err) {<br>        console.error(err);<br>    } finally {<br>        await client.close();<br>    }<br>}<br><br>generateUniqueIds();</pre><p>We used MongoDB’s bulk write operation in this scenario to create distinct IDs for every “<em>cat</em>” and “<em>dog</em>” object within the “<em>pets</em>” array of our MongoDB documents.</p><p>Within <em>generateUniqueIds()</em>, we utilized the client to connect to our database and retrieve the ‘<em>myCollection</em>’ collection. We used the <a href="https://www.mongodb.com/docs/manual/reference/method/db.collection.find/"><em>find()</em></a> method to retrieve all documents in the collection containing a non-empty “<em>pets</em>” array.</p><p>We then set up an empty <em>bulkWriteOperations</em> array to store all of our update operations. We iterated through each document returned by our “<em>pets</em>” query and looped through each animal object in the “<em>pets</em>” array.</p><p>For each <em>pet</em> object, we looped through the “<em>cats</em>” and “<em>dogs</em>” arrays and added a <a href="https://www.mongodb.com/docs/manual/reference/method/db.collection.updateOne/"><em>updateOne</em></a> operation to the <em>bulkWriteOperations</em> array for each “<em>cat</em>” and “<em>dog</em>” object.</p><p>We then utilized the <a href="https://www.mongodb.com/docs/manual/reference/method/db.collection.update/"><em>update</em></a> property to set the “<em>_id</em>” property of the “<em>cat</em>” or “<em>dog</em>” object to a new <a href="https://www.mongodb.com/docs/manual/reference/method/ObjectId/"><em>ObjectId</em></a>. We used the <a href="https://www.mongodb.com/docs/manual/reference/operator/update/positional-filtered/"><em>arrayFilters</em></a> property to specify the array element we want to update based on the name of the “<em>cat</em>” or “<em>dog</em>” object.</p><p>Finally, we used the <a href="https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/"><em>bulkWrite</em></a> method to execute all of our update operations in one batch.</p><p>It will return the following output:</p><pre>{<br>  &quot;_id&quot;: ObjectId(&quot;6141d4ea6af92531f3e174e1&quot;)<br>  &quot;property&quot;: &quot;value&quot;,<br>  &quot;pets&quot;: [<br>    {<br>      &quot;dogs&quot;: [<br>        {<br>          &quot;name&quot;: &quot;Rufus&quot;,<br>          &quot;_id&quot;: ObjectId(&quot;64480108d38569054192869f&quot;),<br>        },<br>        {<br>          &quot;name&quot;: &quot;Buddy&quot;,<br>          &quot;_id&quot;: ObjectId(&quot;64480108d3856905419286a0&quot;),<br>        }<br>      ],<br>      &quot;cats&quot;: [<br>        {<br>          &quot;name&quot;: &quot;Whiskers&quot;,<br>          &quot;_id&quot;: ObjectId(&quot;64480108d38569054192869d&quot;),<br>        },<br>        {<br>          &quot;name&quot;: &quot;Fluffy&quot;,<br>          &quot;_id&quot;: ObjectId(&quot;64480108d38569054192869e&quot;),<br>        }<br>      ]<br>    }<br>  ]<br>}</pre><p>In this way, you can add unique identifiers to the nested arrays of data in MongoDB.</p><p>I hope you liked the article. 🙌</p><p><a href="https://www.linkedin.com/in/itskushagra/">Linkedin</a> | <a href="https://twitter.com/im_Kushagra">Twitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a4718b04b15" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/generate-unique-ids-for-nested-arrays-in-mongodb-using-node-js-7a4718b04b15">Generate Unique IDs for Nested Arrays in MongoDB using Node.js</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing Data Storage: Regular Collection vs Time Series Collection]]></title>
            <link>https://medium.com/codex/analyzing-data-storage-regular-collection-vs-time-series-collection-54532ade7088?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/54532ade7088</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[timeseries]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nosql]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Sun, 09 Apr 2023 12:38:55 GMT</pubDate>
            <atom:updated>2023-04-11T10:25:03.247Z</atom:updated>
            <content:encoded><![CDATA[<p>In the digital age, data storage has become an essential part of our lives. With the continuous generation of large amounts of data, it is crucial to select the right storage solution that can efficiently store and retrieve data.</p><p>MongoDB is a popular document database used by many organizations due to its scalability, flexibility, and ease of use. One of the significant features of MongoDB is its ability to store time-series data efficiently using the <a href="https://www.mongodb.com/time-series">Time Series Collection</a>, which is a specialized bucketing pattern designed explicitly for this purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0FNmP0M0UfTXiTHIgfUDEA.jpeg" /><figcaption>Temperature time-series data — Picture by <a href="https://stats.stackexchange.com/users/112526/danh">danh</a></figcaption></figure><blockquote>Time-series data are generated from various sources with monotonously increasing timestamps, such as IoT data, application logging, infrastructure monitoring, DevOps, stock trading, and cryptocurrency.</blockquote><p>While storing data in a regular collection, MongoDB stores all the documents in the collection without any specific indexing, except for the default index, which is on <em>_id</em>. In contrast, the Time Series Collection uses a combination of bucketing patterns and data compression to store data efficiently.</p><p>To compare the disk usage of the two collections, let’s insert the following data using the script below:</p><pre>const intervalMs = 1000; // 1 second<br>const docsPerMinute = 60;<br>const sensorData = [];<br>let count = 0;<br>let timestampMs = Date.now() - (10 * 24 * 60 * 60 * 1000); // set timestamp to 10 days ago<br><br>while (timestampMs &lt; Date.now()) { // run loop until current time is reached<br>  const doc = {<br>    timestamp: new Date(timestampMs),<br>    measure: -20 + Math.floor(Math.random() * 100),<br>    metadata: {<br>      unit: &quot;Celsius&quot;<br>    }<br>  };<br>  sensorData.push(doc);<br>  count++;<br>  if (count &gt;= docsPerMinute) {<br>    db.sensor.insertMany(sensorData, {ordered: false});<br>    sensorData.length = 0;<br>    count = 0;<br>  }<br>  timestampMs += intervalMs;<br>  setTimeout(() =&gt; {}, intervalMs);<br>}</pre><p>This script generates random temperature data for the last 10 days and will insert it into <em>sensor collection. </em>It creates a document with a <strong>timestamp</strong>, a <strong>measure</strong>, and <strong>metadata</strong> every second, with a total of 60 documents per minute. Later we will insert the same data into the <em>regular collection</em>. We can then compare the disk usage of the two collections to analyze their efficiency in storing data.</p><pre>{<br>  &quot;timestamp&quot;: {<br>    &quot;$date&quot;: &quot;2023-03-30T11:07:25.142Z&quot;<br>  },<br>  &quot;metadata&quot;: {<br>    &quot;unit&quot;: &quot;Celsius&quot;<br>  },<br>  &quot;measure&quot;: 26,<br>  &quot;_id&quot;: {<br>    &quot;$oid&quot;: &quot;64329c6da9d1ea10e8973dc9&quot;<br>  }<br>}<br>....so on</pre><p>To demonstrate the difference in storage efficiency between <em>regular</em> and <em>time-series</em> Collections, we inserted around 864K documents in both collections in <strong>MongoDB 6.0.5</strong> and checked their respective sizes using the ‘<a href="https://www.mongodb.com/docs/manual/reference/method/db.collection.stats/">db.coll.stats()</a>’ command.</p><p>The Time Series Collection’s size was around 1.05 MB, while the regular collection’s size was approximately 16.83 MB. This indicates that the Time Series Collection took less than <em>one-sixteenth</em> of the space required by the regular collection to store the same number of documents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZhUmVzLQFyRCf-wACJSWw.png" /><figcaption>Time series collection vs Regular collection</figcaption></figure><p>The specialized data structure of the Time Series Collection enables efficient storage and retrieval of time-series data, which is achieved through the use of column compression. <a href="https://www.mongodb.com/docs/manual/core/timeseries/timeseries-compression/#:~:text=Starting%20in%20MongoDB%205.2%2C%20time,disk%2C%20and%20improve%20read%20performance.">Starting in MongoDB 5.2</a>, time series collections use column compression, which significantly improves practical compression, reduces overall disk storage, and improves read performance.</p><p>Even, if we compare the <em>totalSize</em> (<em>storageSize + totalIndexSize</em>) of the regular collection, it is 26.2 MB as per the following stats:</p><pre>  count: 864000,<br>  storageSize: 16879616,<br>  totalIndexSize: 9322496,<br>  totalSize: 26202112,<br>  indexSizes: { _id_: 9322496 },<br>  avgObjSize: 87</pre><p>For the time-series collection, the total size is 1 MB, which includes:</p><pre>  count: 864000,<br>  size: 1403590,<br>  storageSize: 1048576,<br>  totalIndexSize: 0,<br>  totalSize: 1048576,</pre><p>Using the Time Series Collection in MongoDB to store time-series data can optimize storage space and improve query performance. Yet, for non-time-series data, a regular collection will be a better option.</p><p>However, by following the best practices, we can further enhance the performance of our time-series collection. For more information on best practices, please refer to the<a href="https://www.mongodb.com/docs/manual/core/timeseries/timeseries-best-practices/"> MongoDB Documentation</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54532ade7088" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/analyzing-data-storage-regular-collection-vs-time-series-collection-54532ade7088">Analyzing Data Storage: Regular Collection vs Time Series Collection</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Future of Chatbots: Are They Getting Closer to Human-Level AI?]]></title>
            <link>https://medium.com/predict/the-future-of-chatbots-are-they-getting-closer-to-human-level-ai-f225aabffbd4?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/f225aabffbd4</guid>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[human-intelligence]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Sat, 18 Feb 2023 20:51:24 GMT</pubDate>
            <atom:updated>2023-02-18T20:51:24.081Z</atom:updated>
            <content:encoded><![CDATA[<h4>Exploring the current state and future prospects of chatbots in achieving human-level intelligence.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B2CQLHIuB3kaalF9" /><figcaption>Photo by <a href="https://unsplash.com/@santesson89?utm_source=medium&amp;utm_medium=referral">Andrea De Santis</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Chatbots have become increasingly popular in recent years, with many businesses incorporating them into their customer service strategies. But the question remains: do chatbots bring us any closer to human-level artificial intelligence (AI)?</p><p>Chatbots are computer programs designed to mimic human conversation through the use of natural language processing (NLP) and machine learning algorithms. They are programmed to understand and respond to specific commands and questions, making them a convenient and cost-effective solution for businesses looking to improve their customer service.</p><p>However, while chatbots have come a long way in terms of their ability to understand and respond to human language, they still fall far short of human-level AI. For example, chatbots are unable to truly understand the context and emotions behind a conversation. They rely on pre-determined responses and can only provide limited responses based on their programming.</p><p>As Elon Musk, the CEO of Tesla and SpaceX, once said, “<strong>Artificial intelligence is a fundamental risk to the existence of human civilization.”</strong> This highlights the fact that while chatbots have the potential to greatly improve our lives, they are still far from truly being able to mimic human intelligence.</p><p>In addition, chatbots lack the ability to learn and evolve on their own. They can only improve through updates and modifications made by their developers. This means that chatbots are limited in their ability to adapt to new situations and provide relevant responses in real time. As Mark Zuckerberg, the CEO of Facebook has stated, “<strong>We’re still in the early stages of what’s possible with AI, and there’s so much more to be discovered and developed.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*7hXrdjJAvD_QFsKv0wnSUQ.jpeg" /></figure><p>Despite these limitations, chatbots are a valuable tool for businesses looking to improve their customer service and streamline their operations. They can handle a large volume of customer inquiries and provide quick, efficient responses, freeing up valuable time and resources for businesses.</p><p>In conclusion, while chatbots may not bring us any closer to human-level AI, they are still valuable tools for businesses looking to improve their customer service and streamline their operations. As technology continues to advance, it is likely that chatbots will continue to evolve and become even more sophisticated in their ability to understand and respond to human language. As Sundar Pichai, the CEO of Google, has noted, “<strong>AI has the potential to transform the world, and it’s happening faster than most people realize.</strong>”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f225aabffbd4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/predict/the-future-of-chatbots-are-they-getting-closer-to-human-level-ai-f225aabffbd4">The Future of Chatbots: Are They Getting Closer to Human-Level AI?</a> was originally published in <a href="https://medium.com/predict">Predict</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing Environment Variables and Secrets in Software Development]]></title>
            <link>https://imkushagra.medium.com/managing-environment-variables-and-secrets-in-software-development-7057a1843f68?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/7057a1843f68</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[configuration-management]]></category>
            <category><![CDATA[environment-variables]]></category>
            <category><![CDATA[configuration]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Wed, 15 Feb 2023 08:42:36 GMT</pubDate>
            <atom:updated>2023-02-15T16:43:55.361Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*gsx95oPGhG-g_u3-jU1s4A.jpeg" /><figcaption>.env image</figcaption></figure><p>Environment variables are key-value pairs that have predetermined values commonly utilized to enable the configuration of a code value from outside the application or software.</p><p>The most common use case for Environment variables is to set up different configuration options for different environments, for example, development environment, production environment, etc. and it’s a crucial aspect of modern software development and deployment. They are being used to store important configuration information that is needed to run applications in various environments.</p><p>The lifecycle of an environment variable can be divided into three main stages: <strong>creation</strong>, <strong>usage</strong>, and <strong>deletion</strong>. During the <strong>creation</strong> stage, the variable is created and defined, and its value is set. During the <strong>usage</strong> stage, the variable is used by the application or software, and its value is accessed to perform a specific task. Finally, during the <strong>deletion</strong> stage, the variable is removed or deleted.</p><p>But when we think about the owner of the environment variable it can be confusing, especially who owns them and who should be responsible for managing and updating them whenever required.</p><p>In general, the owner of an environment variable depends on its purpose. Software Developers are typically responsible for creating and managing them which are specific to the codebase or application they are building. On the other hand, the DevOps team manages the environment variables that are used in configuring infrastructure and deployments pipeline.</p><p>It is important for developers and DevOps teams to work together to ensure environment variables are used properly and securely, even though their responsibilities differ. In order to do this, it is important for teams to establish clear guidelines for creating, managing, and deleting environment variables. This can help to minimize the risk of errors or security breaches.</p><p>One way to ensure the secure use of environment variables is by using secret managers. These are tools that are specifically designed to store and manage sensitive information such as passwords, API keys, and other credentials. Secret managers can help to minimize the risk of data breaches by ensuring that sensitive information is encrypted and only accessible to authorized users.</p><p>However, along with the importance of secret managers in ensuring the secure use of sensitive information, it is essential to integrate it with our application for creating secure and reliable software applications. By prioritizing the integration of secret managers into the development and deployment processes, we can prevent critical production failures and increase application reliability and quality.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7057a1843f68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Asked ‘’AI’’ About The Future of Software Engineering in 2030 — The Answer Was Impressive]]></title>
            <link>https://medium.com/predict/i-asked-ai-about-the-future-of-software-engineering-in-2030-the-answer-was-impressive-f5388e334afe?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5388e334afe</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[art]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[future-of-work]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Sun, 05 Feb 2023 05:32:28 GMT</pubDate>
            <atom:updated>2023-02-07T01:35:45.021Z</atom:updated>
            <content:encoded><![CDATA[<h3>I Asked ‘’AI’’ About The Future of Software Engineering in 2030 — The Answer Was Impressive</h3><figure><img alt="Picture by Andrey Suslov" src="https://cdn-images-1.medium.com/max/612/1*3D5dC6rXE8W8dR_IUu0b8w.jpeg" /><figcaption>Picture by <a href="https://www.istockphoto.com/portfolio/AndSus?mediatype=illustration">Andrey Suslov</a></figcaption></figure><p>As a software engineer, I was always curious about the future of my field. With the rapid pace of technological advancement, I couldn’t help but wonder what software engineering would look like in 2030. So, I decided to ask “AI” about the future of software engineering. And the answer I got was nothing short of amazing.</p><p><strong>My question:</strong></p><blockquote>How it will be like to be a Software Engineer in 2030?</blockquote><p><strong>AI answers:</strong></p><blockquote>It is difficult to predict exactly what is a software engineer in 2030 will be like, but it is likely that advancements in technology will continue to shape the field. Some potential changes that could occur include:</blockquote><blockquote>Increased use of artificial intelligence and machine learning, leading to the automation of some tasks and the need for software engineers to have expertise in these areas.</blockquote><blockquote>Greater emphasis on cybersecurity, as the increasing amount of sensitive data stored and transmitted online, leads to a greater need for secure systems.</blockquote><blockquote>Further developments in areas such as virtual and augmented reality, the Internet of Things, and edge computing, led to new and exciting software engineering opportunities.</blockquote><blockquote>The continued importance of collaboration and communication skills, as software engineers increasingly work on cross-functional teams with people from a variety of backgrounds.</blockquote><blockquote>Regardless of the specific changes that occur, it is likely that the field of software engineering will remain dynamic and continue to evolve.</blockquote><p>Overall, the future of software engineering in 2030 is looking bright, with many exciting advancements on the horizon. As a software engineer, I am thrilled to be part of a field that is constantly evolving and providing new and exciting challenges. The future of software engineering is in good hands, and I am eager to see what the next decade will bring.</p><p>In conclusion, the future of software engineering in 2030 is shaping up to be an exciting and dynamic one, filled with opportunities for growth and innovation. And AI has given us a glimpse into what we can expect.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5388e334afe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/predict/i-asked-ai-about-the-future-of-software-engineering-in-2030-the-answer-was-impressive-f5388e334afe">I Asked ‘’AI’’ About The Future of Software Engineering in 2030 — The Answer Was Impressive</a> was originally published in <a href="https://medium.com/predict">Predict</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Go’s Implementation of Generics with Examples]]></title>
            <link>https://medium.com/codex/understanding-gos-implementation-of-generics-with-examples-26ff5184be61?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/26ff5184be61</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang-tutorial]]></category>
            <category><![CDATA[golang-generics]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 06:59:18 GMT</pubDate>
            <atom:updated>2023-02-06T11:49:15.836Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Guide to Efficient and Type-Safe Code Reusability in Go</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KaovQ9wCpq3O7wN32EJAIA.jpeg" /></figure><p>Go is a statically typed language which means that the type of a value is determined at compile time and not runtime. This can make it challenging to write reusable code that works with values of different types. Go provides a way to write code that is generic, that is, code that can work with values of any type. This is accomplished through the use of interfaces and type assertions.</p><p>One of the key features of Go’s generics implementation is that they are implemented using code generation. This means that the code that is generated is specific to the types that are being used, which results in efficient code that is type-safe. This is in contrast to other languages, such as Java, which implement generics through type erasure, which can result in less efficient code.</p><p>To illustrate how Go’s generics work, consider the following example:</p><pre>package main<br><br>import &quot;fmt&quot;<br><br>func swap(x, y *int) {<br>    temp := *x<br>    *x = *y<br>    *y = temp<br>}<br><br>func main() {<br>    x := 1<br>    y := 2<br>    swap(&amp;x, &amp;y)<br>    fmt.Println(x, y)<br>}<br><br>// Ouput<br>2 1</pre><p>In this example, the swap function takes two pointers to integers and swaps the values that they point to. The swap function can be used with any type by replacing int with the desired type.</p><p>Another example is the use of an interface in Go, which allows us to define a set of methods that can be implemented by any type. This allows us to write generic code that works with values of any type that implements the interface. Consider the following example:</p><pre>package main<br><br>import &quot;fmt&quot;<br><br>type Stringer interface {<br>    String() string<br>}<br><br>func toString(s Stringer) string {<br>    return s.String()<br>}<br><br>type Person struct {<br>    name string<br>    age  int<br>}<br><br>func (p *Person) String() string {<br>    return fmt.Sprintf(&quot;%s is %d years old&quot;, p.name, p.age)<br>}<br><br>func main() {<br>    p := &amp;Person{&quot;John Doe&quot;, 30}<br>    fmt.Println(toString(p))<br>}<br><br>// Output<br>John Doe is 30 years old</pre><p>In this example, the Stringer interface is defined with a single method String that takes no arguments and returns a string. The Person type implements this interface by defining a String method. The toString function takes a value of type Stringer and returns its string representation. This allows us to use the toString function with any type that implements the Stringer interface, not just the Person type.</p><p>In conclusion, Go provides a way to write generic code through the use of code generation and interfaces. This allows us to write reusable code that works with values of any type, which can make our code more concise and maintainable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26ff5184be61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/understanding-gos-implementation-of-generics-with-examples-26ff5184be61">Understanding Go’s Implementation of Generics with Examples</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cracking the Code: How to Ace Job Interviews Like a User Researcher]]></title>
            <link>https://medium.com/codex/cracking-the-code-how-to-ace-job-interviews-like-a-user-researcher-a94369ed2982?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/a94369ed2982</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[user-research]]></category>
            <category><![CDATA[job-search]]></category>
            <category><![CDATA[research]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Sun, 29 Jan 2023 10:36:46 GMT</pubDate>
            <atom:updated>2023-01-30T13:37:38.013Z</atom:updated>
            <content:encoded><![CDATA[<p>As a user researcher, your job is to understand the needs and behaviors of your target audience in order to design products and experiences that meet their needs. But what happens when it’s time for you to be the one being interviewed? How can you apply the same user research skills to ace your job interview and land your dream job?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*mWkELmXP0QCYXPak4shEjQ.jpeg" /></figure><p>First, it’s important to remember that a job interview is a two-way street. Just as you are evaluating the company and the position to see if it’s a good fit for you, the interviewer is also evaluating you to see if you’re a good fit for the company and the position. With this in mind, it’s important to approach the interview as a research opportunity.</p><p>Before the interview, take the time to research the company and the position. Look at the company’s website and social media pages, read its mission statement and values and check out any press they’ve received. Research the position to understand the responsibilities and requirements, and think about how your skills and experience align with what the company is looking for.</p><p>During the interview, be prepared to ask thoughtful and specific questions about the company and the position. This not only shows the interviewer that you’ve done your research, but it also gives you valuable information that will help you determine if the company and position are a good fit for you.</p><p>Another key aspect of user research is active listening. In an interview, active listening means paying close attention to the interviewer’s questions and responding thoughtfully and specifically. Avoid giving generic or canned answers, and instead, use specific examples and anecdotes from your past experiences to demonstrate how your skills and experience align with what the company is looking for.</p><p>Lastly, don’t forget to be yourself. At the end of the day, the company wants to see the real you and how you would fit into their culture. So, don’t be afraid to show your personality and let the interviewer get a sense of who you are as a person.</p><p>In summary, approaching a job interview as a user researcher means doing your research, asking thoughtful questions, actively listening, and being yourself. By following these tips, you’ll be able to ace your job interview and land your dream job.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a94369ed2982" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/cracking-the-code-how-to-ace-job-interviews-like-a-user-researcher-a94369ed2982">Cracking the Code: How to Ace Job Interviews Like a User Researcher</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tech Up Your Game: A Guide to Self-Improvement in the Technology Domain]]></title>
            <link>https://medium.com/predict/tech-up-your-game-a-guide-to-self-improvement-in-the-technology-domain-e2108225837a?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2108225837a</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[it-industry]]></category>
            <category><![CDATA[layoffs]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Sat, 28 Jan 2023 10:20:46 GMT</pubDate>
            <atom:updated>2023-02-09T02:26:12.528Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*3shG76d2sE6AoIc5Q_X8Tg.jpeg" /><figcaption>Photo © Wrightstudio</figcaption></figure><p>The technology industry is constantly evolving and advancing, and it can be challenging to keep up with the latest trends and developments. However, by focusing on self-improvement in the technology domain, you can stay ahead of the curve and advance your career.</p><p>The first step in self-improvement in the technology domain is to set a clear and specific goal. This could be anything from learning a new programming language to gaining certification to building a portfolio of projects. Whatever it may be, make sure that your goal is relevant to your field and is something that you truly desire.</p><p>Once you have a goal in mind, it’s important to create a plan of action. This could include setting up a study schedule, finding a mentor, or joining a community of like-minded individuals. It’s also important to make sure that your plan is realistic and achievable, as this will increase your chances of success.</p><p>In addition to setting goals and creating a plan of action, it’s important to stay up-to-date with the latest trends and developments in the technology industry. This could include reading industry publications, attending conferences and networking events, and following thought leaders on social media.</p><p>Another key aspect of self-improvement in the technology domain is to focus on developing a specific skill set. This could include learning a new programming language, mastering a specific technology, or developing a particular area of expertise. The more you focus on developing a specific skill set, the more marketable you will be in the technology industry.</p><p>Finally, it’s important to be patient and persistent. The technology industry is constantly evolving, and there will be setbacks and obstacles along the way. However, with perseverance and determination, you can overcome any obstacle and advance your career.</p><p>In conclusion, self-improvement in the technology domain is essential for staying ahead of the curve and advancing your career. By setting clear and specific goals, creating a plan of action, staying up-to-date with the latest trends, developing a specific skill set, and being patient and persistent, you can tech up your game and achieve success in the technology industry.</p><p>Follow me at <a href="http://www.linkedin.com/in/itsKushagra">www.linkedin.com/in/itsKushagra</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2108225837a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/predict/tech-up-your-game-a-guide-to-self-improvement-in-the-technology-domain-e2108225837a">Tech Up Your Game: A Guide to Self-Improvement in the Technology Domain</a> was originally published in <a href="https://medium.com/predict">Predict</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with JSON in Golang]]></title>
            <link>https://medium.com/codex/working-with-json-in-golang-9dad4770ccb3?source=rss-35e4f8134661------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dad4770ccb3</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[go]]></category>
            <dc:creator><![CDATA[Kushagra Kesav]]></dc:creator>
            <pubDate>Thu, 23 Jun 2022 10:29:52 GMT</pubDate>
            <atom:updated>2022-06-26T14:35:08.018Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pbw0WWp_vING4kRe" /><figcaption>Image by Author</figcaption></figure><p>Golang provides multiple APIs to work with JSON including to and from built-in and custom data types using the <a href="https://pkg.go.dev/encoding/json"><strong>encoding/json</strong></a> package.</p><blockquote>Golang converts the object into JSON and JSON data to string with <a href="https://pkg.go.dev/encoding/json#Marshal"><strong>Marshal()</strong></a><strong> </strong>and <a href="https://pkg.go.dev/encoding/json#Unmarshal"><strong>Unmarshal()</strong></a><strong> </strong>methods. The methods returned data in byte format and we need to change returned data into JSON or String.</blockquote><p>In this article, we will understand data <strong>marshaling </strong>and <strong>unmarshalling </strong>in <strong>Golang</strong>.</p><h3>Marshal in Golang</h3><p>Converting Go objects into JSON is called marshaling in Golang using inbuilt encoding/json package to perform JSON-related operations.</p><pre>json.Marshal(v any) ([]byte, error)</pre><p>With the help of the above function, Marshal returns the JSON encoding of v and further, we can convert the byte data into a string and return it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/be8807f4d1be34de0d507f087193b259/href">https://medium.com/media/be8807f4d1be34de0d507f087193b259/href</a></iframe><h3>Unmarshal in Golang</h3><p>It’s just the opposite of Marshal. Converting JSON(Byte data) into Struct and stores the result in the value pointed to by the variable.</p><pre>json.Unmarshal(data []byte, v any)</pre><p>With the help of the above function, Unmarshal returns the actual value of the JSON data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52e5464baa5bed8f2eb103fc891b7c1d/href">https://medium.com/media/52e5464baa5bed8f2eb103fc891b7c1d/href</a></iframe><p>Now let’s look use both the above function to write some code and do some modifications to the JSON dataset.</p><p>Let us consider the given data set: 👇🏻</p><pre>{<br>  &quot;_id&quot;: &quot;62b435e407bc586da8d297cb&quot;,<br>  &quot;index&quot;: 4,<br>  &quot;guid&quot;: &quot;57a22da3-d791-4420-9245-465a34730537&quot;,<br>  &quot;gender&quot;: &quot;male&quot;,<br>  &quot;company&quot;: &quot;EZENT&quot;,<br>  &quot;email&quot;: &quot;<a href="/service/mailto:barrerajarvis@ezent.com">barrerajarvis@ezent.com</a>&quot;,<br>  &quot;phone&quot;: &quot;+1 (801) 499-2594&quot;,<br>  &quot;friends&quot;: [<br>    {<br>      &quot;id&quot;: 0,<br>      &quot;name&quot;: &quot;Dale Sexton&quot;,<br>      &quot;email&quot;: &quot;<a href="/service/mailto:Dale.sexton@example.com">Dale.sexton@example.com</a>&quot;<br>    },<br>    {<br>      &quot;id&quot;: 1,<br>      &quot;name&quot;: &quot;Watkins Puckett&quot;,<br>      &quot;email&quot;: &quot;<a href="/service/mailto:Watkins.puckett@example.com">Watkins.puckett@example.com</a>&quot;<br>    },<br>    {<br>      &quot;id&quot;: 2,<br>      &quot;name&quot;: &quot;Luann Bond&quot;,<br>      &quot;email&quot;: &quot;<a href="/service/mailto:Luann.bond@example.com">Luann.bond@example.com</a>&quot;<br>    }<br>  ],<br>  &quot;greeting&quot;: &quot;Hello, Barrera Jarvis! You have 8 unread messages.&quot;,<br>  &quot;favoriteFruit&quot;: &quot;banana&quot;<br>}</pre><p>And, problem statement is to write down the code to delete the <strong>email</strong> <strong>field</strong> from the <strong>array of friends.</strong></p><p><strong>Now, let’s write down the code to modify the JSON data:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5bf9868d7eefe18ba525fc0e1b0c1d62/href">https://medium.com/media/5bf9868d7eefe18ba525fc0e1b0c1d62/href</a></iframe><p>I hope you liked the article.</p><p><strong><em>Thanks for Reading</em></strong></p><p><a href="https://www.linkedin.com/in/itskushagra/">Linkedin</a> | <a href="https://twitter.com/im_Kushagra">Twitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dad4770ccb3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/working-with-json-in-golang-9dad4770ccb3">Working with JSON in Golang</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>