<?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"><channel><title><![CDATA[Jayesh Karli's Blog]]></title><description><![CDATA[I'm a Software Enginner from India. I write about my experiences and sometimes frustrations about programming world. I love making new programmers/non-programme]]></description><link>https://blog.jayeshkarli.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 15:07:37 GMT</lastBuildDate><atom:link href="https://blog.jayeshkarli.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Atomic Habits]]></title><description><![CDATA[Before we start, let me ask you a question.
How important are habits?
Just share your honest opinion, that is all I ask. I'm hoping most people would say they are essential and I would completely agree. In case you say they don't, I would love to hea...]]></description><link>https://blog.jayeshkarli.dev/atomic-habits</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/atomic-habits</guid><category><![CDATA[habits]]></category><category><![CDATA[learning]]></category><category><![CDATA[jobs]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[development]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 02 Apr 2023 12:34:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/RflgrtzU3Cw/upload/667206d24801380785dd253a8028d41b.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Before we start, let me ask you a question.</p>
<p><strong>How important are habits?</strong></p>
<p>Just share your honest opinion, that is all I ask. I'm hoping most people would say they are essential and I would completely agree. In case you say they don't, I would love to hear why you think so.</p>
<p>As I was reading the book <em>Atomic Habit by James Clear,</em> I was thinking this is a fantastic book and it can help me become a better software engineer(SE). So here I am trying to share the lessons I learned and how they can be applied to the field of SE specifically.</p>
<p>The book is not written for software engineers specifically. So I thought, why not fill that void?</p>
<p>Please note that I have just covered the first three chapters as I feel like these three chapters are core to this book and teach a lot. However, after reading this article if you feel like I need to write an article on other chapters please let me know in the comments.</p>
<h2 id="heading-chapter-one">Chapter One</h2>
<p>Chapter one, titled <strong>The Surprising Power of Atomic Habits</strong> conveys the importance of tiny improvements over the long term.</p>
<p>For example, let's say you want a well-paying SE job, we all know the biggest hurdle is going to be the leetcode grind, Data Structures and Algorithms(DSA), and technical knowledge in general.</p>
<p>We all look at how people solved tons of questions and build great projects to get such fancy jobs. However, you are stuck at the same job for a while and cannot find time out of your busy schedule.</p>
<p>The easiest solution would be to start at the base level. Solve just one problem per day, work on your project for maybe just 30mins to 60mins per day, and before you know it you will have already solved more than 100 questions and will have a complete project in a matter of months.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672254192429/841144a5-90f3-47ea-b1b2-b4d441590e8b.png" alt class="image--center mx-auto" /></p>
<p>In contrast to the above situation, let's say you just watch TV and Netflix because you get very little time outside work and want to just relax. The time will pass and you won't even know it. Days, weeks, months, and even years just pass by.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672254215782/5defd39e-d09d-41b2-a491-da1d92c46ca3.png" alt class="image--center mx-auto" /></p>
<p>Over a year, the difference is very significant. <strong>365</strong> leetcode questions vs <strong>zero</strong> leetcode questions. At least <strong>2 to 3 complete projects</strong> vs again <strong>zero projects</strong>. On top of that if you keep sharing your journey on LinkedIn and Twitter, maybe you will also gain a significant following or at least make meaningful connections.</p>
<p>Now, I'll accept that I haven't solved 365 questions in the past year or completed 2 to 3 side projects. However, even without consistency, I have solved more than 50 leetcode questions, built a portfolio site &amp; hosted it on the internet, completed a course on the basics of data structures &amp; algorithms, wrote a few articles on hashnode, and these are just things I can remember on top of my head. I have been more consistent in 2023 but these numbers are about 2022.</p>
<p>You can read my 2022 dev journey <a target="_blank" href="https://blog.jayeshkarli.dev/persevering-through-trials-and-tribulations-as-a-developer-dev-retro-2022">here</a> to learn more about my job situation as well but I hope you get the point.</p>
<blockquote>
<p>It's not about what we can do on a given day but it's about what we can do over a period of time to get compounding results.</p>
</blockquote>
<p>This chapter was all about a 1% improvement from the previous day. Now let's move on to the next chapter.</p>
<h2 id="heading-chapter-two">Chapter Two</h2>
<p>Chapter two, titled <strong>How Your Habits Shape Your Identity (and Vice Versa)</strong> shares the importance of changing our identity to make it easier to achieve our goals.</p>
<p>If someone asks you, who are you? What do you think will be the answer? I guess most of us will say student if we are in college or school and our job title otherwise.  </p>
<p>When we want to achieve something we should change our identity or add a new identity. In case you want to be fit you can view yourself as an athlete and not a normal person who just views going to the gym as a chore.</p>
<p>If you want to be a better software engineer, call yourself a software engineer. You are not an aspiring software engineer, a coder or a programmer. You are a software engineer and now you are more likely to put in the effort needed to improve your technical skills.</p>
<h2 id="heading-chapter-three">Chapter Three</h2>
<p>Chapter three, titled <strong>How to Build Better Habits in 4 Simple Steps.</strong></p>
<p>Understanding these steps is not rocket science. So let's see what they are</p>
<ol>
<li><p>Make it obvious</p>
</li>
<li><p>Make it attractive</p>
</li>
<li><p>Make it easy</p>
</li>
<li><p>Make it satisfying</p>
</li>
</ol>
<p>These steps are in general great to build good habits.</p>
<p>As software engineers, our goal is to write better software and get a better well paying job or work on that product you want to launch. Either way, you need better skills and you can only develop those skills with practice.</p>
<p>Let's try to achieve the above goal with the four steps shared in chapter three.</p>
<p>Step one: Let's assume you want better problem-solving skills and want to practice problem-solving every day. To make it more obvious you can always keep one leetcode tab open in your browser. This way whenever you open your laptop you will get a reminder of what you need to do first.</p>
<p>Step two: Now that we have made it obvious, let's make it attractive. We know the reward for our actions will be that dream job. Keeping in mind the reason we are working hard can make it very attractive.</p>
<p>Step three: Our goal is both obvious and attractive. To make it easy, we can always start with easy problems. No matter how little you know about problem-solving if you know basic syntax there will be problems that you can solve.</p>
<p>Step four: Let's make it satisfying as well. To make problem-solving satisfying you can give yourself a little treat every time you solve a problem. Maybe 5 minutes of YouTube or a little bit of chocolate or anything that works for you.</p>
<p>Once we have set up this loop, eventually we will develop a habit of solving problems.</p>
<hr />
<p>Thank you so much for reading and if you have any feedback please leave it in comments.</p>
]]></content:encoded></item><item><title><![CDATA[Mongo DB Basics]]></title><description><![CDATA[MongoDB is a popular open-source NoSQL database management system that is widely used for its flexible and scalable data model. Unlike traditional relational databases, MongoDB uses a document-based data model, which allows for more flexibility and s...]]></description><link>https://blog.jayeshkarli.dev/mongo-db-basics</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/mongo-db-basics</guid><category><![CDATA[MongoDB]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[json]]></category><category><![CDATA[Bson]]></category><category><![CDATA[Databases]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 26 Feb 2023 11:11:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1677409791805/c1b64bdc-1583-41f0-86ce-f159a65d408c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>MongoDB is a popular open-source NoSQL database management system that is widely used for its flexible and scalable data model. Unlike traditional relational databases, MongoDB uses a document-based data model, which allows for more flexibility and scalability when it comes to storing data. In this article, we will delve into the concepts of collections, databases, and document hierarchy in MongoDB.</p>
<h2 id="heading-collections-in-mongodb">Collections in MongoDB</h2>
<p>In MongoDB, collections are the equivalent of tables in a relational database. A collection contains a group of related documents, and each document in a collection represents an individual record in the database. For example, you could have a collection for users and another collection for orders. Each collection can contain documents that have different structures, allowing you to store data in a flexible and scalable way.</p>
<h2 id="heading-databases-in-mongodb">Databases in MongoDB</h2>
<p>Databases in MongoDB are a way to organize collections. A single MongoDB instance can contain multiple databases, and each database can have multiple collections. This allows you to separate data into different databases, making it easier to manage and maintain your data. For example, you could have a database for your development environment and another database for your production environment.</p>
<h2 id="heading-the-document-hierarchy-in-mongodb">The Document Hierarchy in MongoDB</h2>
<p>The document hierarchy in MongoDB is straightforward. At the highest level, you have a MongoDB instance, which can contain multiple databases. Each database can contain multiple collections, and each collection can contain multiple documents.</p>
<p>It is important to understand the document hierarchy in MongoDB because it affects how you store and retrieve data. For example, you may want to store data about users in one collection, and data about orders in another collection.</p>
<p>When working with collections and documents in MongoDB, it is also important to understand the data model and how it affects the way you store and retrieve data. MongoDB uses a document-based data model, which allows you to store data in a flexible and scalable way. This means that you can store different types of data in a single document, and you can easily retrieve data based on specific criteria.</p>
<p>For example, let's say you have a collection of users, and each document in the collection represents a single user. You could store information such as the user's name, email, and address in the document. When you need to retrieve a specific user's information, you can easily do so by querying the collection based on specific criteria, such as the user's email address.</p>
<h3 id="heading-the-benefits-of-mongodbs-document-hierarchy">The Benefits of MongoDB's Document Hierarchy</h3>
<p>One of the key benefits of MongoDB's document hierarchy is that it allows for more flexibility and scalability when it comes to storing data. Unlike traditional relational databases, MongoDB does not require you to define a schema for your data, which means that you can store data in a more flexible and scalable way.</p>
<p>Another benefit of MongoDB's document hierarchy is that it allows for better performance when it comes to querying data. MongoDB uses indexing to optimize query performance, and you can create indexes on specific fields in a collection to improve query performance. This means that you can quickly and easily retrieve data based on specific criteria, making it ideal for modern web applications that require fast and efficient data retrieval.</p>
<p>Finally, MongoDB's document hierarchy also makes it easier to maintain and manage your data. Since you can store data in a flexible and scalable way, you can easily make changes to your data model as your application evolves. This means that you can easily adapt your data model to meet the changing needs of your application, without having to make major changes to your database structure.</p>
<p><strong>In conclusion, understanding collections, databases, and document hierarchy in MongoDB is crucial for effectively using the database.</strong></p>
]]></content:encoded></item><item><title><![CDATA[MongoDB Data-Types]]></title><description><![CDATA[In my last article about MongoDB, I wrote about what it is and why should you learn it. Today we'll learn a bit more about the data types that we can store in MongoDB.
JSON vs BSON
In my last article, I mentioned that MongoDB uses BSON data type and ...]]></description><link>https://blog.jayeshkarli.dev/mongodb-data-types</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/mongodb-data-types</guid><category><![CDATA[MongoDB]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Databases]]></category><category><![CDATA[datatypes]]></category><category><![CDATA[NoSQL]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 05 Feb 2023 08:08:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1668351836035/visETtbAa.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In my <a target="_blank" href="https://jayesh-karli.hashnode.dev/introduction-to-mongodb">last article</a> about MongoDB, I wrote about what it is and why should you learn it. Today we'll learn a bit more about the data types that we can store in MongoDB.</p>
<h1 id="heading-json-vs-bson">JSON vs BSON</h1>
<p>In my last article, I mentioned that MongoDB uses BSON data type and not JSON. The BSON stands for Binary JSON and JSON stands for JavaScript Object Notation.</p>
<p>For the most part, JSON and BSON are very similar. While using Mongo shell or accessing it through a node driver we can hardly see the difference between JSON and BSON.</p>
<p>BSON has additional data types and is much more efficient for storing and retrieving data. BSON achieves efficiency due to the fact that it stores type and length data when encoding information.</p>
<p>For a more detailed comparison, you can read the official MongoDB article <a target="_blank" href="https://www.mongodb.com/json-and-bson">here</a>.</p>
<h1 id="heading-data-types">Data Types</h1>
<p>Now let's have a look at a list of some important MongoDB data types.</p>
<ul>
<li><p>ObjectId: This is a unique identifier that is generated for each document in a MongoDB collection. It is a 12-byte value that consists of a 4-byte timestamp, a 3-byte machine ID, a 2-byte process ID, and a 3-byte counter. Objectives are often used as the default value for the "_id" field in a MongoDB document.</p>
</li>
<li><p>32-bit integer (int): This data type represents a signed 32-bit integer value. It can store values between -2147483648 and 2147483647.</p>
</li>
<li><p>64-bit integer (float): This data type represents a signed 64-bit floating-point value. It can store values with higher precision and range than the 32-bit integer data type.</p>
</li>
<li><p>Double: This data type represents a double-precision floating-point value. It can store values with higher precision and range than the 64-bit integer data type.</p>
</li>
<li><p>Decimal128: This data type represents a 128-bit decimal value. It allows you to store numbers with a high degree of precision, making it useful for financial applications.</p>
</li>
<li><p>String: This data type represents a sequence of Unicode characters. Strings can be of any length and can include any valid Unicode character.</p>
</li>
<li><p>Object: This data type represents an embedded document in MongoDB. It allows you to store nested data structures within a document.</p>
</li>
<li><p>Array: This data type represents a list of values. Arrays can contain any valid data type, including other arrays.</p>
</li>
<li><p>Binary data: This data type represents a sequence of binary data. It can be used to store images, audio, or other types of binary data.</p>
</li>
<li><p>Boolean: This data type represents a true or false value.</p>
</li>
<li><p>Date: This data type represents a date and time value. It stores the number of milliseconds since the Unix epoch (January 1, 1970).</p>
</li>
<li><p>Timestamp: This data type represents a timestamp value, which consists of a timestamp and a counter. It is used to store the creation and modification times for a document.</p>
</li>
</ul>
<blockquote>
<p>Note that there are some addition data types offered by MongoDB which you can read in more detail <a target="_blank" href="https://www.mongodb.com/docs/manual/reference/bson-types/">here</a>.</p>
</blockquote>
<p>Do let me know if you've any feedback or think something's missing...</p>
]]></content:encoded></item><item><title><![CDATA[Persevering Through Trials and Tribulations as a Developer: Dev Retro 2022]]></title><description><![CDATA[Ahh, it's that time of the year again.
Many will make new year's resolutions, few will start them and even fewer people will follow through.

We can't predict the future. However, we can learn from the past and that's what we'll do in this article.

...]]></description><link>https://blog.jayeshkarli.dev/persevering-through-trials-and-tribulations-as-a-developer-dev-retro-2022</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/persevering-through-trials-and-tribulations-as-a-developer-dev-retro-2022</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Developer]]></category><category><![CDATA[#DevRetro2022]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Mon, 26 Dec 2022 18:26:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1671981440406/91b0c343-5978-4fa2-a3e5-6202be019783.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Ahh, it's that time of the year again.</p>
<p>Many will make new year's resolutions, few will start them and even fewer people will follow through.</p>
<blockquote>
<p>We can't predict the future. However, we can learn from the past and that's what we'll do in this article.</p>
</blockquote>
<p>So let's start <strong>#DevRetro2022</strong></p>
<h1 id="heading-start-of-the-year">Start of the year</h1>
<p>The start of the year was stressful, to say the least, and this is not the last time I was gonna experience it.</p>
<p>As months went by the job only got tougher. However, we'll talk about them in the next few sections. For now, let's concentrate on the starting few months.</p>
<blockquote>
<p>Life never gets easier, you just learn and adapt.</p>
</blockquote>
<p>I got my <strong>first job</strong> offer when I was in college and joined the organization I'm currently working for in June of 2021. June 14th, 2021 to be more precise. Like any beginner, I was excited to learn and leave my mark.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672072557769/77dad3ca-b81d-43f6-9005-ac8076c9366f.png" alt class="image--center mx-auto" /></p>
<p>The client I'm currently working for was assigned to me in mid-December 2021, and in the first couple of weeks, I was doing just local setup(installing necessary software) and watching some Knowledge Transfer(KT) videos.</p>
<p>In the last week of December 2021, I got my first task which was to simply add some regex to form input(backend and frontend). I dragged this task to the first or second week of January(I don't remember the exact timeline LOL).</p>
<p>It wasn't because I was dumb or their system was something out of the world. I was just completely new and didn't know how to search for the right field in the huge codebase.</p>
<p>At this point, I was genuinely stressed. I mean who wouldn't be?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672072275641/b214232d-5e32-4ebb-b062-00fd41994c32.png" alt class="image--center mx-auto" /></p>
<p>I learned two things from this experience</p>
<ol>
<li><p>With time, you'll solve the problem. (A lesson which I keep relearning now and then)</p>
</li>
<li><p>Ask for help if you're stuck for too long.</p>
</li>
</ol>
<p>I never expected a simple regex problem to give me so much stress or teach me such important lessons which now seem very obvious.</p>
<p>After completing this task, I got one more task. It was to write a script to export data from MongoDB into an excel file and share that file over mail in regular time intervals. This task was a little easier because I had the liberty to choose any language so I naturally chose JavaScript(JS) and NodeJS.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672072409755/15f613b7-8135-4b7c-bc2f-ee27bd5b3b18.png" alt class="image--center mx-auto" /></p>
<p>I got a few more tasks after this but they were very trivial like changing the text on the front end or changing the content of tables on the front end. For this brief period, I wasn't stressed at all.</p>
<h1 id="heading-my-first-exciting-and-challenging-task">My first exciting and challenging task</h1>
<p>After spending a few weeks, now it was time to pick up some actual challenging work. I had to build a new module for managing data related to different branches of a bank.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672072809389/6ee83611-9fee-4572-8d88-cd6f070eecc3.png" alt class="image--center mx-auto" /></p>
<p>This was probably my favorite task out of all tasks I've completed for my current client. I got to work with some nice frameworks and got to learn something new.</p>
<p>Below is the list of technologies I used</p>
<ul>
<li><p>AngularJS ( Not to be confused with Angular)</p>
</li>
<li><p>Play framework (Using java language)</p>
</li>
<li><p>MongoDB for storing data</p>
</li>
<li><p>ElasticDB for search</p>
</li>
</ul>
<p>I had experience with the MEAN(MongoDB - ExpressJS - Angular - NodeJS) stack and I had studied JS in lockdown before starting my job. I even have a playlist of some videos related to JS on my YouTube channel which you can find <a target="_blank" href="https://www.youtube.com/watch?v=kB2Y5bjfuAc&amp;list=PLFCu9e3nCZvJKAkunGxRZL1IybW1px3B7">here</a>.</p>
<p>However, I had never worked with AnguarJS or Play or Elastic for that matter. By the way, AngularJS is not Angular and I have an article relating to it <a target="_blank" href="https://blog.jayeshkarli.dev/angularjs-is-not-angular">here</a>. So it was challenging to pick up a new framework on the go.</p>
<p><em>Play</em> wasn't much hard because at the end of the day I was writing java code and it had a familiar structure. MongoDB wasn't a challenge because it was nothing new and ElasticDB was a bit confusing but I referred to old queries and didn't need to do much.</p>
<p>The biggest challenge was AngularJS. In the beginning, it felt so different from anything I've ever worked with. I gave it some time and after a week or so it started feeling somewhat familiar. I guess that's the advantage of working with vanilla JS and knowing some basics of others frameworks/libraries.</p>
<p>More than anything this experience truly taught me that knowing the basics of a language is crucial to understanding and working with the framework.</p>
<h1 id="heading-first-office-experience">First office experience</h1>
<p>One day my manager asked me to join a google meet. It was to inform me that I had to go to the client's office. I had to start going to the office from 1st week of May. I was going to my client's client's office(two clients isn't a typo btw). Whenever I say bank just assume it to be the client's client.</p>
<p>Since I was hired during the Pandemic, I didn't have any experience working from the office. However, I had a few expectations like getting to wear anything we want and maybe free food. I didn't get any of that but I did get to meet two of my colleagues for the first time. I had never even seen the face of anyone I've worked with because of the Pandemic.</p>
<p>Now that I was working directly with stakeholders, the work stress was even greater. I was still relatively new with only 3-4 months of experience. I kept missing deadlines but didn't give up. Shoutout to my colleagues who helped me in the initial days.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672072091847/42375e35-4651-4f7c-b2cd-e96773b37fb4.png" alt class="image--center mx-auto" /></p>
<p>With time, I learned more about the system. I became better at debugging the code. I started understanding how different microservices related to each other. More importantly, I learned to give more realistic timelines for tasks. I'd say giving proper timelines for tasks is one of the toughest parts of any job.</p>
<p>One valuable lesson here is that even if you're the most tech-savvy person in the room it's important to understand the current system and business requirements.</p>
<blockquote>
<p>Knowing how to do something is pretty pointless if you don't know what to do.</p>
</blockquote>
<p>I don't think my technical competence was the issue in task delays but rather a combination of a few points listed below</p>
<ul>
<li><p>Not asking for help sooner.</p>
</li>
<li><p>Sometimes, not trying hard enough.</p>
</li>
<li><p>Giving unrealistic timelines for my skill level.</p>
</li>
</ul>
<p>I was scrolling through Instagram someday and there was a post saying</p>
<blockquote>
<p>Hard times don't last, people do.</p>
</blockquote>
<p>I don't remember who posted this or when I read this but I think this is a great quote.</p>
<h1 id="heading-hybrid-work-experience">Hybrid work experience</h1>
<p>After four months, I was called back to work with the client and not for the bank. When I was going to the bank it was a completely different experience and I had to go to the office every day. The work didn't change much but the workplace did and it did make a difference.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672073602142/3551c4c7-a144-490e-903a-7d64aa17f8b7.png" alt class="image--center mx-auto" /></p>
<p>Now I was finally wearing casual clothes at work for the first time. I know for many people it's not that big of a deal but I always wanted to look like a stereotypical programmer just for fun and little comfort.</p>
<p>I had to go to the office just 2 days instead of 5 days a week. The office was even closer than the previous one. All in all, it was definitely better for me personally. The best thing was meeting more people I work with.</p>
<h1 id="heading-technologies-i-learned-this-year">Technologies I learned this year...</h1>
<p>This was a rather weird year for me personally but I did try some new technologies so let's talk about them.</p>
<h2 id="heading-angularjs">AngularJS</h2>
<p>This is one technology that I had never touched in my life and now I'm fairly confident in writing code for AngularJS. I wouldn't recommend using it and considering how it's outdated for a long time now, I don't think anyone will.</p>
<p>I don't think this specific technology would help me a lot going forward if I ever switch projects but it definitely taught me that I can pick up any JS framework and be productive in it.</p>
<p>More than the technology itself, I think learning about how important basics are was the best thing I got out of AngularJS.</p>
<h2 id="heading-elasticdb">ElasticDB</h2>
<p>This is one technology that is very exciting to me.</p>
<p>It does something different than MongoDB and traditional SQL databases (DBs). It has a different use case and it's very good at searching data.</p>
<p>I still have a lot to learn about it and I promise I will.</p>
<p>Maybe I'll even write an article series or make youtube videos about ElasticSearch next year. Depends on a lot of factors but it's definitely a possibility.</p>
<h2 id="heading-kotlin">Kotlin</h2>
<p>Ever since I made a basic android application, I was hearing about Kotlin and how it was now Google's first choice for building native android applications.</p>
<p>I always wanted to try it but because of trying to learn/improve other language skills I never got to it during the pandemic.</p>
<p>I solved a few leetcode questions using Kotlin and really loved the syntax but after that, I didn't use it for a while. However, I recently started a Spring Boot project in Kotlin and have a basic skeleton ready. I have paused that project for now because I want to finish other pending tasks first but I'll 100% complete at least a basic version of it.</p>
<p>It may take some time to get to it but hopefully, I can get to it soon enough.</p>
<h2 id="heading-blockchain-web3">Blockchain / Web3</h2>
<p>The biggest buzzwords of 2022 were Web3 and Blockchain.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1671994855934/6dee9cc5-57c5-4a90-b8b0-efaef87a8de6.png" alt class="image--center mx-auto" /></p>
<p>I think the above meme sums up the Blockchain situation pretty accurately. I did read some articles about it and got some fundamental understanding but never dived too deep.</p>
<p>I would definitely love to learn about all the technologies related to Web3 but for now, I think I have enough gaps in my Web2 knowledge to chase the trend of Web3.</p>
<p>At the end of the day, the web is web. 2, 3, or 5 are just numbers. If you have good basics and core Computer Science knowledge, that's what matters the most.</p>
<p>Personally, I would've loved to learn more technologies but due to work and my laziness, I definitely learned less than I could've.</p>
<h1 id="heading-leetcode">Leetcode</h1>
<p>I think this article would be incomplete without talking about my <a target="_blank" href="https://leetcode.com/karli/">leetcode</a> profile.</p>
<p>I have solved 167 questions in total till now(25th Dec 2022)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1671994347659/4ee8bf2d-23d6-4f58-9709-0f2e187fe7c2.png" alt class="image--center mx-auto" /></p>
<p>I have 336 submissions</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1671994379055/29bec37c-713b-4a1b-a769-e5362241419b.png" alt class="image--center mx-auto" /></p>
<p>I know, I could've done much better but a small break turned into a huge one. My leetcode skills need a lot of work and hopefully, when I'll be writing #DevRetro2023 I'll have a much better record to share with you guys.</p>
<p>Even the 167 questions, I have solved wasn't solved on my own. That's one more thing I would love to improve. Do leave any tips you may have specific to my situation, would love to hear from you guys.</p>
<p>However, this is what I have for the year 2022.</p>
<h1 id="heading-my-portfolio-site">My Portfolio Site</h1>
<p>I wanted to build a personal portfolio website for so long and I finally did. I started and completed it in the April of 2022.</p>
<p>You can visit the site <a target="_blank" href="https://www.jayeshkarli.dev/">here</a> and I promise it's beautiful.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672074214368/8a480b3d-17e2-413a-b481-4780b02d6a3c.png" alt class="image--center mx-auto" /></p>
<p>I didn't have time to build it out completely on my own and make it mobile-responsive so I took the help of a YouTube video. <a target="_blank" href="https://youtu.be/27JtRAI3QO8">Here's</a> the link for that video.</p>
<p>Just yesterday(24th Nov 2022) I bought a new domain for the first in my life so it was exciting. Before that my portfolio was hosted on the netlifys subdomain and my blog was hosted on the hashnodes subdomain.</p>
<p>It was a little confusing to figure out how to use the domain I bought but in the end, I figured it out. It was both fun and exciting.</p>
<p>URL for my portfolio - <a target="_blank" href="https://www.jayeshkarli.dev/">https://www.jayeshkarli.dev/</a><br />URL for my blog - <a target="_blank" href="https://blog.jayeshkarli.dev/">https://blog.jayeshkarli.dev/</a></p>
<p>Now both are hosted on my personal domain which feels pretty good, to be honest.</p>
<h1 id="heading-chatgpt">ChatGPT</h1>
<p>Just as this year was about to end we got ChatGPT. The AI program was developed to take over the jobs of developers around the world or may be a glorified search engine for some people.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1672074452251/02caf7d3-dd9f-4635-9bd6-f3a7621ca3db.png" alt class="image--center mx-auto" /></p>
<p>I would love to learn more about your opinion in the comments.</p>
<p>I panicked a little but for now, I don't think it's any threat to my job. By the time, it takes our jobs I think there'll be some alternatives or maybe Universal Basic Income(UBI).</p>
<p>I'm quite curious about how fast it'll progress and how it will change our society but I guess only time will answer that question.</p>
<p>For now, all we can do is upskill ourselves and hope for the best.</p>
<h1 id="heading-the-ending">The Ending</h1>
<p>Now that the year has almost ended, I have mixed feelings about 2023. However, I'll just focus on the positive ones for now and go into the future with hope and optimism.</p>
<p>Happy new year and Merry Christmas to all my friends reading this blog. I hope you enjoy your holidays to the fullest and come back with fresh energy to fight the demons of 2023.</p>
<p>Thank you for reading the blog, if you could relate to any point in my Dev Retro 2022 please do share your experience in the comments.</p>
]]></content:encoded></item><item><title><![CDATA[Shiny Object Syndrome in Tech]]></title><description><![CDATA[We all know the anxiety we get when a new framework or language is released. 
Why?
I believe one of the biggest reasons is definitely the thought of being left behind. 
While it is true that we need to stay up to date with latest trends, that doesn't...]]></description><link>https://blog.jayeshkarli.dev/shiny-object-syndrome-in-tech</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/shiny-object-syndrome-in-tech</guid><category><![CDATA[trends]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Web3]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 31 Jul 2022 05:20:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/bRjlMiTbk4M/upload/v1649513120756/j9Yk4VftpF.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We all know the anxiety we get when a new framework or language is released. </p>
<h2 id="heading-why">Why?</h2>
<p>I believe one of the biggest reasons is definitely the thought of being left behind. </p>
<p>While it is true that we need to stay up to date with latest trends, that doesn't mean we have to change our field of expertise every year. </p>
<p>Also, whenever there's a new technology we know there aren't many "experts" in that field so maybe there's also some greed. </p>
<p>Being first in something which is probably going to be an influential technology might mean a lot of money. However, we should remember that sticking to one area of expertise like frontend or backend isn't the worst thing to do, especially in long term. </p>
<p>At the end of the day I think it's just important to remember that if you're good at your job and give yourself time to settle in, you'll get paid regardless of whether you're working on web3 app or php project. </p>
<h2 id="heading-how">How?</h2>
<p>We all like to think that we're smart enough to not chase the "NEXT BIG THING" but regardless we end up getting pulled in. </p>
<p>It all starts and ends with social media hype. Recently, it was web3 and before that it was Machine Learning (ML), Artificial Intelligence (AI) and evergreen JavaScript (JS). While all of these are amazing technologies and I recommend having at least basic understanding of them, I don't think you should abandon whatever you're doing and start pursuing a career in them. </p>
<p>Of course, there are exceptions to what I just said and some people may not like the area they're working in and in such cases if you find your interest in ML, AI, Web3 or anything else that's awesome. </p>
<p>Social media is great for learning about latest trends. However, it may not be the best tool for making career choices. </p>
<p>I think at the end of the day it's just about knowing basics of computer science, everything else will keep evolving and changing. </p>
]]></content:encoded></item><item><title><![CDATA[Introduction to MongoDB]]></title><description><![CDATA[In this tutorial, we'll look at what MongoDB is and why you should bother learning it?
Let's start with why
Here are just a few reasons why I think it's worth our time to learn more about this exciting technology :

It's in demand and as far as I can...]]></description><link>https://blog.jayeshkarli.dev/introduction-to-mongodb</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/introduction-to-mongodb</guid><category><![CDATA[MongoDB]]></category><category><![CDATA[Databases]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[NoSQL]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 17 Jul 2022 14:43:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1657557564953/z21J02QiM.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this tutorial, we'll look at what MongoDB is and why you should bother learning it?</p>
<h2 id="heading-lets-start-with-why">Let's start with why</h2>
<p>Here are just a few reasons why I think it's worth our time to learn more about this exciting technology :</p>
<ul>
<li><p>It's in demand and as far as I can tell it'll remain in demand for quite a while, so it's a safe bet.</p>
</li>
<li><p>If you've worked with JSON data, you'll be able to learn about MongoDB documents in no time.</p>
</li>
<li><p>MongoDB is very popular with NodeJS and ReactJS/Angular/Vue(ton of front-end frameworks/libraries) for building full-stack applications. </p>
</li>
<li><p><strong>Horizontally Scalable</strong> .i.e adding more machines. This is in contrast to <strong>Vertical Scaling</strong> where we add more resources(CPU, RAM, etc) which is not always feasible.</p>
</li>
<li><p><strong>Flexibility</strong>. In MongoDB, we don't need to have a strict and fixed schema from the start, we can always add new fields as our needs evolve.</p>
</li>
<li><p>Most of the data types in MongoDB map very easily to data types available in most languages. </p>
</li>
</ul>
<blockquote>
<p>I strongly believe in knowing why you're learning something before starting it.</p>
</blockquote>
<p>Now that we know why, let's explore how.</p>
<h2 id="heading-how-to-learn-mongodb">How to learn MongoDB</h2>
<p>Considering how this is going to be a tutorial series on MongoDB this section might seem a little strange. However, there's a good reason behind this short section.</p>
<blockquote>
<p>No one article or video can teach you everything.</p>
</blockquote>
<p>Below are some of my recommendations on how to truly learn and understand not just MongoDB but any technology in general :</p>
<ul>
<li><p>Nothing in this world is perfect so there's no harm in trying different articles, books, and videos.</p>
</li>
<li><p>Always use official <a target="_blank" href="https://www.mongodb.com/docs/">documentation</a> if you want to dig deeper. </p>
</li>
<li><p>Don't expect to learn and understand everything overnight.</p>
</li>
<li><p>Be consistent.</p>
</li>
</ul>
<h2 id="heading-what-is-mongodb">What is MongoDB?</h2>
<p>If you google "What is MongoDB?" you'll find many articles with good answers and they all will have some common words used like NoSQL database, document-oriented, open source, cross-platform, optional schema/schemaless, etc.</p>
<p>Let's have a look at those and understand what they mean</p>
<ul>
<li><p><strong>NoSQL Database</strong> and <strong>Optional schema / Schemaless</strong> means that, unlike SQL databases, we don't have to follow a specific schema/structure for documents that we're going to store.</p>
</li>
<li><p><strong>Document-oriented</strong> means that we don't store data in terms of tables and rows. We store data in Binary JavaScript Object Notation(BSON) format. We will discuss all the supported data types in the coming articles.</p>
</li>
</ul>
<pre><code><span class="hljs-comment">/* Below is an example of a document stored in MongoDB collection */</span>

{
  <span class="hljs-attribute">platform</span>: <span class="hljs-string">"hashnode"</span>,
  name: <span class="hljs-string">"JayeshKarli"</span>,
  action: [
    <span class="hljs-string">"Read-Articles"</span>,
    <span class="hljs-string">"Follow"</span>
  ]
}
</code></pre><ul>
<li><p><strong>Open-source</strong> simply means that the source code for  MongoDB is publically accessible. If interested you can click <a target="_blank" href="https://github.com/mongodb/mongo">here</a> to explore the MongoDB GitHub repo.</p>
</li>
<li><p>MongoDB is <strong>cross-platform</strong> which allows us to use it on multiple platforms.</p>
</li>
</ul>
<p>I hope this article helps you to get started with MongoDB. Drop a reaction if you like the article and if you don't tell me why in the comments, I love positive criticism. </p>
<p>Follow me for more such articles.</p>
]]></content:encoded></item><item><title><![CDATA[Leetcode daily challenges - My Experience and Opinions.]]></title><description><![CDATA[I've been solving leetcode daily challenges for a few weeks now. Here are some observations I made along the way and why I think you should start LeetCode daily challenges.
I can clearly see that it asks the specific type of problems continuously and...]]></description><link>https://blog.jayeshkarli.dev/leetcode-daily-challenges-my-experience-and-opinions</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/leetcode-daily-challenges-my-experience-and-opinions</guid><category><![CDATA[leetcode]]></category><category><![CDATA[DSA]]></category><category><![CDATA[Developer]]></category><category><![CDATA[dailydev]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 12 Jun 2022 11:33:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/SyvsTmuuZyM/upload/v1655033530802/qW6x89g81.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been solving leetcode daily challenges for a few weeks now. Here are some observations I made along the way and why I think you should start LeetCode daily challenges.</p>
<p>I can clearly see that it asks the specific type of problems continuously and then changes its type.</p>
<p>It starts the month easily and then ramps up the difficulty, especially at the month's end. (Kudos to anyone who solves all problems)</p>
<p>I enjoy solving daily challenges because they aren't overwhelming and they are relatively small, which in turn makes them more achievable.</p>
<p>However, when done consistently over time, the questions add up, and before you know you've solved more questions than you imagined.</p>
<blockquote>
<p>Even if we solve just one question per day, over a year it becomes 365 questions.</p>
</blockquote>
<p>Some of them will be easy, most will be medium, and some will be hard, but trust me when I say you'll learn a lot.</p>
<p>If this post helps/motivates you to start leetcode daily challenges, please do consider following Jayesh Karli.</p>
<p>Consider sharing this post with your network.</p>
]]></content:encoded></item><item><title><![CDATA[Subsets - Leetcode]]></title><description><![CDATA[Bit Manipulation
public List<List<Integer>> subsets(int[] nums) {
        List<List<Integer>> res = new ArrayList<>();

        int len = nums.length;

        for(int n = 0; n < Math.pow(2, len); n++) {
            List<Integer> curList = new ArrayL...]]></description><link>https://blog.jayeshkarli.dev/subsets-leetcode</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/subsets-leetcode</guid><category><![CDATA[problem solving skills]]></category><category><![CDATA[interview]]></category><category><![CDATA[Java]]></category><category><![CDATA[Competitive programming]]></category><category><![CDATA[leetcode]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 22 May 2022 12:37:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/CL12MZdzPsA/upload/v1653223047378/-2BlG9ywT.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-bit-manipulation">Bit Manipulation</h1>
<pre><code><span class="hljs-keyword">public</span> List<span class="hljs-operator">&lt;</span>List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span><span class="hljs-operator">&gt;</span> subsets(<span class="hljs-keyword">int</span>[] nums) {
        List<span class="hljs-operator">&lt;</span>List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span><span class="hljs-operator">&gt;</span> res <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> ArrayList<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>();

        <span class="hljs-keyword">int</span> len <span class="hljs-operator">=</span> nums.<span class="hljs-built_in">length</span>;

        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> n <span class="hljs-operator">=</span> <span class="hljs-number">0</span>; n <span class="hljs-operator">&lt;</span> Math.pow(<span class="hljs-number">2</span>, len); n<span class="hljs-operator">+</span><span class="hljs-operator">+</span>) {
            List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span> curList <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> ArrayList<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>();
            <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i <span class="hljs-operator">=</span> <span class="hljs-number">0</span>; i <span class="hljs-operator">&lt;</span> len; i<span class="hljs-operator">+</span><span class="hljs-operator">+</span>) {
                <span class="hljs-keyword">if</span>( (n <span class="hljs-operator">&amp;</span> (<span class="hljs-number">1</span> <span class="hljs-operator">&lt;</span><span class="hljs-operator">&lt;</span> i)) <span class="hljs-operator">!</span><span class="hljs-operator">=</span> <span class="hljs-number">0</span> )
                    curList.add(nums[i]);
            }
            res.add(curList);
        }

        <span class="hljs-keyword">return</span> res;
    }
</code></pre><h1 id="heading-recursion">Recursion</h1>
<pre><code><span class="hljs-keyword">public</span> List<span class="hljs-operator">&lt;</span>List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span><span class="hljs-operator">&gt;</span> subsets(<span class="hljs-keyword">int</span>[] nums) {
        List<span class="hljs-operator">&lt;</span>List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span><span class="hljs-operator">&gt;</span> res <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> ArrayList<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>();

        f(res, <span class="hljs-number">0</span>, <span class="hljs-keyword">new</span> ArrayList<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>(), nums);

        <span class="hljs-keyword">return</span> res;

    }

    <span class="hljs-keyword">private</span> void f(List<span class="hljs-operator">&lt;</span>List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span><span class="hljs-operator">&gt;</span> res, <span class="hljs-keyword">int</span> ind, List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span> arr, <span class="hljs-keyword">int</span>[] nums) {
        <span class="hljs-keyword">if</span>(nums.<span class="hljs-built_in">length</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> ind) {
            res.add(<span class="hljs-keyword">new</span> ArrayList<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>(arr));
            System.out.println(arr);
            <span class="hljs-keyword">return</span>;
        }

        arr.add(nums[ind]);
        f(res, ind<span class="hljs-operator">+</span><span class="hljs-number">1</span>, arr, nums);
        arr.remove(arr.size() <span class="hljs-operator">-</span> <span class="hljs-number">1</span>);
        f(res, ind<span class="hljs-operator">+</span><span class="hljs-number">1</span>, arr, nums);

    }
</code></pre>]]></content:encoded></item><item><title><![CDATA[Lessons only a job can teach you]]></title><description><![CDATA[Let's start with "why"
It's been almost a year(11 months to be precise) since I joined my first job. However, I got my first client in December and learned some very important lessons which I think every aspiring developer/student should know.
So if ...]]></description><link>https://blog.jayeshkarli.dev/lessons-only-a-job-can-teach-you</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/lessons-only-a-job-can-teach-you</guid><category><![CDATA[job]]></category><category><![CDATA[learning]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 08 May 2022 14:21:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/LDcC7aCWVlo/upload/v1652019572574/789h1VV8l.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-lets-start-with-why">Let's start with "why"</h2>
<p>It's been almost a year(11 months to be precise) since I joined my first job. However, I got my first client in December and learned some very important lessons which I think every aspiring developer/student should know.</p>
<p>So if you're trying to land a developer job or if you're just starting one, I'm sure this article will help you.</p>
<h2 id="heading-1-youll-eventually-find-the-solution">1. You'll eventually find the solution.</h2>
<p>I know we shouldn't give up and keep trying to solve a problem but sometimes it just becomes too hard. Oftentimes we just give up when it becomes too hard but when you're in a job that's not an option. </p>
<p>These are the times when you've to ask for help, you've to make the best use of google and you've to just keep trying. Most of the time the answer is just in front of our eyes. </p>
<blockquote>
<p>Just don't give up &amp; you'll find a solution.</p>
</blockquote>
<h2 id="heading-2-ask-for-help">2. Ask for help.</h2>
<p>Now I know this sounds simple and it is. However, it's not always the easiest thing to do especially if you're shy or introverted(or maybe both).</p>
<p>Personally, I was terrified of asking for help at the beginning mostly because of imposter syndrome (it's a whole topic on its own).</p>
<p>I think apart from being shy and/or introverted this is the issue with most developers and the only solution is to take a deep breath and send that message asking for help. Trust me you'll thank me and the person who helps you.</p>
<p>Most of the time senior developers don't reply because they're genuinely busy and they know if you just give some time to your problem you'll find a solution. So, I don't see not getting a quick reply as something negative.</p>
<p>One more very important piece of advice when asking questions is to try everything you can possibly do. On top of that when you ask questions make them as elaborate as possible without any fluff.</p>
<blockquote>
<p>Sometimes your problem can be solved with a single message.</p>
</blockquote>
<h2 id="heading-3-the-easiest-solution-is-the-right-one">3. The easiest solution is the right one.</h2>
<p>Now, don't go out there implementing the most inefficient solutions just because they're easy. However, you don't always need the most efficient solution either.</p>
<p>As a developer, we all have at least a basic understanding of time and space complexity(if you don't I'd highly recommend learning some basics).</p>
<p>One thing many developers ignore is the time it takes to develop the solution and code readability for other developers.</p>
<p>This is why I believe in implementing the easiest possible solution which is easy to understand(readability) and doesn't take up all our time.</p>
<p>Now there are obviously exceptions to this rule like maybe some software used in hospitals can't be rushed. Even in such cases, code readability is still equally (I'd argue more) important.</p>
<blockquote>
<p>Simplicity is the solution to all problems.</p>
</blockquote>
<p>I hope this post helps someone and I'd love to listen to others' opinions on this topic as well.</p>
]]></content:encoded></item><item><title><![CDATA[Search in a Binary Search Tree  - LeetCode]]></title><description><![CDATA[Binary Search Tree (BST) is an excellent data structure for search operations and this question is an excellent one to practice its basics.
BST Properties

The left sub-tree will always have values less than the root.
The right sub-tree will always h...]]></description><link>https://blog.jayeshkarli.dev/search-in-a-binary-search-tree-leetcode</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/search-in-a-binary-search-tree-leetcode</guid><category><![CDATA[search]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[problem solving skills]]></category><category><![CDATA[interview]]></category><category><![CDATA[coding]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Thu, 14 Apr 2022 14:47:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/tGTVxeOr_Rs/upload/v1649945891696/ADJPhSeLT.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Binary Search Tree (BST)</strong> is an excellent data structure for search operations and this question is an excellent one to practice its basics.</p>
<h2 id="heading-bst-properties">BST Properties</h2>
<ul>
<li>The left sub-tree will always have values less than the root.</li>
<li>The right sub-tree will always have values greater than the root.</li>
</ul>
<h2 id="heading-iterative-approach">Iterative approach</h2>
<p>The first step is just checking if the root node is null or if its value is equal to val. If that's the case we just return our root node because it satisfies our condition.</p>
<p>After that, we jump into our while loop and  do the following</p>
<ol>
<li>Check for the same base condition in every iteration.</li>
<li>If the current node's value is greater than val we move to the left subtree.</li>
<li>If the current node's value is lesser than val we move to the right subtree.</li>
</ol>
<p>After we're out of the loop our node's value is either null or equal to val.
So we simply return that node.</p>
<pre><code>class Solution {
    <span class="hljs-keyword">public</span> TreeNode searchBST(TreeNode root, <span class="hljs-keyword">int</span> val) {

        <span class="hljs-keyword">if</span>(root <span class="hljs-operator">=</span><span class="hljs-operator">=</span> null <span class="hljs-operator">|</span><span class="hljs-operator">|</span> root.val <span class="hljs-operator">=</span><span class="hljs-operator">=</span> val) <span class="hljs-keyword">return</span> root;

        <span class="hljs-keyword">while</span>(root <span class="hljs-operator">!</span><span class="hljs-operator">=</span> null <span class="hljs-operator">&amp;</span><span class="hljs-operator">&amp;</span> root.val <span class="hljs-operator">!</span><span class="hljs-operator">=</span> val) {

            root <span class="hljs-operator">=</span> root.val <span class="hljs-operator">&gt;</span> val ? root.left : root.right;

        }

        <span class="hljs-keyword">return</span> root;
    }
}
</code></pre><h2 id="heading-recursive-approach">Recursive approach</h2>
<p>We are performing the following three operations for a recursive solution -</p>
<ol>
<li>Return the current node if its value is equal to val or null.</li>
<li>If val is greater than the value of the current node we go to the right subtree.</li>
<li>If val is lesser than the value of the current node we go to the left subtree.</li>
</ol>
<pre><code>class Solution {
    <span class="hljs-keyword">public</span> TreeNode searchBST(TreeNode root, <span class="hljs-keyword">int</span> val) {

        <span class="hljs-keyword">if</span>(root <span class="hljs-operator">=</span><span class="hljs-operator">=</span> null <span class="hljs-operator">|</span><span class="hljs-operator">|</span> root.val <span class="hljs-operator">=</span><span class="hljs-operator">=</span> val) <span class="hljs-keyword">return</span> root;

        <span class="hljs-keyword">if</span>(val <span class="hljs-operator">&gt;</span> root.val)
            <span class="hljs-keyword">return</span> searchBST(root.right, val);
        <span class="hljs-keyword">else</span> 
            <span class="hljs-keyword">return</span> searchBST(root.left, val);
    }
}
</code></pre><p>Thank you for reading and if you've any doubts/suggestions please do share them in the comments.</p>
]]></content:encoded></item><item><title><![CDATA[Baseball Game - Leetcode]]></title><description><![CDATA[This problem is very straightforward, we just have to convert the problem statement into code. However, it's a really nice problem to practice our time & space complexity analysis skills.
Link to the problem on leetcode.
I've also discussed time & sp...]]></description><link>https://blog.jayeshkarli.dev/baseball-game-leetcode</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/baseball-game-leetcode</guid><category><![CDATA[problem solving skills]]></category><category><![CDATA[interview]]></category><category><![CDATA[coding challenge]]></category><category><![CDATA[Competitive programming]]></category><category><![CDATA[data structures]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sun, 10 Apr 2022 08:03:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/UVxd5b-_tw8/upload/v1649576385355/1yDK02-Gj.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This problem is very straightforward, we just have to convert the problem statement into code. However, it's a really nice problem to practice our <em>time &amp; space complexity analysis</em> skills.</p>
<p><a target="_blank" href="https://leetcode.com/problems/baseball-game/">Link</a> to the problem on leetcode.</p>
<p>I've also discussed time &amp; space complexity following the code solution.</p>
<p><strong>1. Code Solution in Java - </strong></p>
<pre><code>class Solution {
    <span class="hljs-keyword">public</span> <span class="hljs-keyword">int</span> calPoints(String[] ops) {

        List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span> scores <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> ArrayList<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>();

        <span class="hljs-keyword">for</span>(String el: ops) {

            final <span class="hljs-keyword">int</span> lastIndex <span class="hljs-operator">=</span> scores.size() <span class="hljs-operator">-</span> <span class="hljs-number">1</span>;
            <span class="hljs-keyword">int</span> result;

            switch(el) {
                case <span class="hljs-string">"+"</span>:
                    result <span class="hljs-operator">=</span> scores.get(scores.size() <span class="hljs-operator">-</span> <span class="hljs-number">1</span>) <span class="hljs-operator">+</span> scores.get(scores.size() <span class="hljs-operator">-</span> <span class="hljs-number">2</span>);
                    scores.add(result);
                    <span class="hljs-keyword">break</span>;
                case <span class="hljs-string">"D"</span>:
                    result <span class="hljs-operator">=</span> scores.get(lastIndex) <span class="hljs-operator">*</span> <span class="hljs-number">2</span>;
                    scores.add(result);
                    <span class="hljs-keyword">break</span>;
                case <span class="hljs-string">"C"</span>:
                    scores.remove(lastIndex);
                    <span class="hljs-keyword">break</span>;
                default:
                    scores.add(Integer.parseInt(el));
                    <span class="hljs-keyword">break</span>;
            }
        }

        <span class="hljs-keyword">int</span> res <span class="hljs-operator">=</span> <span class="hljs-number">0</span>;
        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> el: scores) { res <span class="hljs-operator">+</span><span class="hljs-operator">=</span> el; }
        <span class="hljs-keyword">return</span> res;
    }

}
</code></pre><p><strong>2. Time Complexity -</strong></p>
<blockquote>
<p>Time Complexity is O(n), where n = size of ops. </p>
</blockquote>
<p>O(n) is the result of looping through the ops array exactly once.
All other operations inside are constant-time operations. </p>
<p>The remove method for case "C" could be O(n) in time complexity.
However, it's just O(1) because we're removing the last element from the list.
We don't need to change the list after removing the last item.</p>
<p><strong>3. Space Complexity -</strong></p>
<blockquote>
<p>Space Complexity is O(n), where n ~ size of ops. </p>
</blockquote>
<p>Since case "C" just invalidates the previous score without adding anything,
it reduces the space taken by our List storing all the scores.</p>
<p>Therefore, n is approximately equal to the size of ops but not always the same.</p>
]]></content:encoded></item><item><title><![CDATA[Top K Frequent Elements - Leetcode]]></title><description><![CDATA[You can find the link to the problem- here
First solution with bucket sort and time complexity O(n)
class Solution {
    public int[] topKFrequent(int[] nums, int k) {
        if(nums.length == 1)
            return nums;

        /**
        *
     ...]]></description><link>https://blog.jayeshkarli.dev/top-k-frequent-elements-leetcode</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/top-k-frequent-elements-leetcode</guid><category><![CDATA[learn coding]]></category><category><![CDATA[Developer]]></category><category><![CDATA[data structures]]></category><category><![CDATA[problem solving skills]]></category><category><![CDATA[interview]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Sat, 09 Apr 2022 03:03:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/SyYmXSDnJ54/upload/v1649473172430/cnO0tvsdv.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You can find the link to the problem- <a target="_blank" href="https://leetcode.com/problems/top-k-frequent-elements/">here</a></p>
<p>First solution with bucket sort and time complexity O(n)</p>
<pre><code>class Solution {
    <span class="hljs-keyword">public</span> <span class="hljs-keyword">int</span>[] topKFrequent(<span class="hljs-keyword">int</span>[] nums, <span class="hljs-keyword">int</span> k) {
        <span class="hljs-keyword">if</span>(nums.<span class="hljs-built_in">length</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">1</span>)
            <span class="hljs-keyword">return</span> nums;

        <span class="hljs-comment">/**
        *
        * We are using HashMap to store the frequency of numbers 
        * We'll use it in the next steps
        */</span>
        HashMap<span class="hljs-operator">&lt;</span>Integer, Integer<span class="hljs-operator">&gt;</span> numsMap <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> HashMap<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>();
        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> el: nums) {
            numsMap.put(el, numsMap.getOrDefault(el, <span class="hljs-number">0</span>) <span class="hljs-operator">+</span> <span class="hljs-number">1</span>);
        }

        <span class="hljs-comment">/**
        *
        * We create an array of List&lt;Integer&gt; for storing all elements with a certain frequency
        * 
        *
        * If we have more than one element with frequency 2, we'll store those elements
        * at index 2 in our List at that index in buckets array. 
        * We'll repeat the same process for all the possible frequencies, if there are no numbers with a certain 
        * frequency it's List will just point to null
        *
        * NOTE - 
        * The reason for creating an array with a length greater than nums.length is because
        * indexing starts from zero but we want to store elements with indexes starting from one and going till
        * nums. length, that's why we need the size to be greater by one unit.
        *
        */</span>
        List<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span>[] buckets <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> ArrayList[nums.<span class="hljs-built_in">length</span> <span class="hljs-operator">+</span> <span class="hljs-number">1</span>];
        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> el: numsMap.keySet()) {
            <span class="hljs-keyword">int</span> freq <span class="hljs-operator">=</span> numsMap.get(el);
            <span class="hljs-keyword">if</span>(buckets[freq] <span class="hljs-operator">=</span><span class="hljs-operator">=</span> null)
                buckets[freq] <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> ArrayList<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span>();
            buckets[freq].add(el);
        }

        <span class="hljs-comment">/**
        *
        * We're looping through our buckets array in reverse to get all the elements
        * with highest frequencies first.
        *
        * Whenever our list for a certain frequency is null we'll just skip it.
        * However, if we do find a list with values, we'll add those values to result array
        * and increment our index till we exhaust the list of till the index is equal to k
        * 
        */</span>
        <span class="hljs-keyword">int</span>[] result <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> <span class="hljs-keyword">int</span>[k];
        <span class="hljs-keyword">int</span> index <span class="hljs-operator">=</span> <span class="hljs-number">0</span>;

        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> freq <span class="hljs-operator">=</span> buckets.<span class="hljs-built_in">length</span> <span class="hljs-operator">-</span> <span class="hljs-number">1</span>; freq <span class="hljs-operator">&gt;</span> <span class="hljs-number">0</span>; freq<span class="hljs-operator">-</span><span class="hljs-operator">-</span>) {
            <span class="hljs-keyword">if</span>(buckets[freq] <span class="hljs-operator">=</span><span class="hljs-operator">=</span> null)
                <span class="hljs-keyword">continue</span>;
            <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> el: buckets[freq]) {
                result[index<span class="hljs-operator">+</span><span class="hljs-operator">+</span>] <span class="hljs-operator">=</span> el;
                <span class="hljs-keyword">if</span>(index <span class="hljs-operator">=</span><span class="hljs-operator">=</span> k)
                    <span class="hljs-keyword">return</span> result;
            }

        }

        <span class="hljs-keyword">return</span> result;
    }
}
</code></pre><p>Second solution using Priority Queue, we follow a similar approach by creating a hashmap with elements and their frequencies. After that, we store our elements in a priority queue with the highest frequency elements having the highest priority. Finally, we just assign top k values to our result array and return the result array.</p>
<pre><code>class Solution {
    <span class="hljs-keyword">public</span> <span class="hljs-keyword">int</span>[] topKFrequent(<span class="hljs-keyword">int</span>[] nums, <span class="hljs-keyword">int</span> k) {
        <span class="hljs-keyword">if</span>(nums.<span class="hljs-built_in">length</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">1</span>)
            <span class="hljs-keyword">return</span> nums;


        HashMap<span class="hljs-operator">&lt;</span>Integer, Integer<span class="hljs-operator">&gt;</span> numsMap <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> HashMap<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>();

        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> el: nums) {
            <span class="hljs-keyword">if</span>(numsMap.containsKey(el)) {
                <span class="hljs-keyword">int</span> count <span class="hljs-operator">=</span> numsMap.get(el);
                count<span class="hljs-operator">+</span><span class="hljs-operator">+</span>;
                numsMap.put(el, count);
                <span class="hljs-keyword">continue</span>;
            }
            numsMap.put(el, <span class="hljs-number">1</span>);
        }

        PriorityQueue<span class="hljs-operator">&lt;</span>Integer<span class="hljs-operator">&gt;</span> pq <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> PriorityQueue<span class="hljs-operator">&lt;</span><span class="hljs-operator">&gt;</span>((a,b)<span class="hljs-operator">-</span><span class="hljs-operator">&gt;</span>numsMap.get(b) <span class="hljs-operator">-</span> numsMap.get(a));
        pq.addAll(numsMap.keySet());

        <span class="hljs-keyword">int</span>[] result <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> <span class="hljs-keyword">int</span>[k];
        <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i<span class="hljs-operator">=</span><span class="hljs-number">0</span>; i<span class="hljs-operator">&lt;</span>k; i<span class="hljs-operator">+</span><span class="hljs-operator">+</span>) {
            result[i] <span class="hljs-operator">=</span> pq.remove();
        }

        <span class="hljs-keyword">return</span> result;
    }
}
</code></pre><p>If someone finds any mistake or any opportunity for improvement please do share in the comments, thank you.</p>
]]></content:encoded></item><item><title><![CDATA[AngularJS is not Angular.]]></title><description><![CDATA[I won't be covering technical differences between AngularJS and Angular in this article but rather the consequences of not knowing they're different. If still interested please read on.

What is AngularJS?
AngularJS is a javascript framework like Rea...]]></description><link>https://blog.jayeshkarli.dev/angularjs-is-not-angular</link><guid isPermaLink="true">https://blog.jayeshkarli.dev/angularjs-is-not-angular</guid><category><![CDATA[Angular]]></category><category><![CDATA[Angular 2]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[CSS]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Jayesh Karli]]></dc:creator><pubDate>Thu, 20 May 2021 13:06:07 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1621511419271/nlhMA2P0B.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h4 id="i-wont-be-covering-technical-differences-between-angularjs-and-angular-in-this-article-but-rather-the-consequences-of-not-knowing-theyre-different-if-still-interested-please-read-on">I won't be covering technical differences between AngularJS and Angular in this article but rather the consequences of not knowing they're different. If still interested please read on.</h4>
<hr />
<h1 id="what-is-angularjs">What is AngularJS?</h1>
<p>AngularJS is a javascript framework like React, Vue, and Angular.
It is an open-source front-end framework supported by google and many open-source contributors. According to  <a target="_blank" href="https://en.wikipedia.org/wiki/AngularJS">Wikipedia</a>  it was released on October 20, 2010. AngularJS is the oldest of the javascript frameworks that can be used to build  <strong>Single Page Applications (SPAs)</strong>, it was Angular version 1.</p>
<hr />
<h1 id="what-is-angular">What is Angular?</h1>
<p>After the release of Angular version one, the team of AngularJS released Angular version two which was a complete rewrite of version one. Angular is a typescript-based open-source front-end framework used to develop amazing SPAs. It was first released on 14 September 2016. 
(Source -  <a target="_blank" href="https://en.wikipedia.org/wiki/Angular_(web_framework">Wikipedia</a>) )</p>
<hr />
<h1 id="my-frustrations">My frustrations</h1>
<p>We all know how useful StackOverflow is, it's without a doubt super crucial for solving our doubts. However, I saw a tweet by StackOverflow </p>
<p></p><blockquote><p>Which web framework gives you the chills? <a href="https://t.co/PjezZZFEN0">pic.twitter.com/PjezZZFEN0</a></p>— Stack Overflow (@StackOverflow) <a href="https://twitter.com/StackOverflow/status/1394941095654699010?ref_src=twsrc%5Etfw">May 19, 2021</a></blockquote> <p></p>
<p>It says "Angular.js is the most dreaded framework(and it is)" but there's one point that no one clarifies, angular.js is not angular.</p>
<p>Now, you may think it's not that big of a deal but think from a beginner's perspective they don't know that Angular2 and above are completely different from AngularJS.</p>
<p>When I started learning Angular, these were the thoughts I had in my mind</p>
<ul>
<li>Isn't ReactJS the most popular framework/library?</li>
<li>People say angular is too tough and it's not worth it, maybe I should drop it.</li>
<li>People hate angular so much it must be terrible.</li>
</ul>
<p>All of these thoughts just because some people on social media were hating Angular without even knowing(or at least without telling others) that AngularJS is not Angular.</p>
<hr />
<h1 id="how-reactjs-developers-behave">How ReactJS developers behave</h1>
<p>I can open literally any social media platform and I will find new ReactJS developers who think the tool is greater than skills and React is the god of everything. I have tried ReactJS and I find its <a target="_blank" href="https://reactjs.org/docs/introducing-jsx.html">JSX</a>  syntax a little weird. Apart from the syntax, I think ReactJS is a great JavaScript library for building amazing web applications. It's a great tool but it does not mean it's the best tool, because there is no best tool. </p>
<p>Now if someone is searching for a job in most places ReactJS has the most jobs so no one can compete with React there. However, knowing or trying other frameworks never hurts and jobs for other frameworks are definitely not zero.</p>
<p>Angular is the biggest victim of React's popularity, I have seen so many people writing negative comments about Angular without even trying it because they "like" ReactJS.Now, there's nothing wrong with liking a framework or library but the problem is we shouldn't try to scare away new developers from trying out other technologies.</p>
<hr />
<h1 id="good-things-about-angular-or-angular-version-2">Good things about Angular or Angular Version 2+</h1>
<p>At the time of writing this article, Angular 12 is the latest version of  <a target="_blank" href="https://blog.angular.io/angular-v12-is-now-available-32ed51fbfd49">Angular</a>. It updates every six months but still, the core concepts haven't changed from version 2. </p>
<p>We work simply with HTML, CSS or SASS or SCSS or LESS, and TypeScript(all valid JavaScript is valid TypeScript).</p>
<p>Angular is known to be the toughest framework to learn but I respectfully disagree, it's an amazing framework. It literally took me just 4-5hrs to understand the basics of Angular(same as React in my case). Mastering angular may take months or more but it's the same story for any framework you pick. Starting is easy, mastering is not.</p>
<p>One of the best features in Angular is how we can directly write sass code instead of CSS and Angular handles everything from thereon.</p>
<p>Now I can't cover all good things here, angular  <a target="_blank" href="https://angular.io/">docs</a> is the best place to learn more about it.</p>
<p>Angular is an amazing framework, it really is. Just try it.</p>
<p>Just one tip, don't dive into JavaScript frameworks without having a solid JavaScript base.</p>
<p>If you're new to web development you can also check out my <a target="_blank" href="https://www.youtube.com/channel/UCBx3lI4R6bRGJhbiu4A_uCA">YouTube</a> channel, I have a <a target="_blank" href="https://www.youtube.com/watch?v=wM1cPlCgVKQ&amp;list=PLFCu9e3nCZvIQUNxXZ6PR_uzpVTpn1gI_">playlist</a> on web development give it a shot.</p>
<p>Thank you for reading.</p>
]]></content:encoded></item></channel></rss>