<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jahid2121</title>
    <description>The latest articles on Forem by Jahid2121 (@jahid2121).</description>
    <link>https://forem.com/jahid2121</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1182541%2F6b725b37-ef9e-4dba-8e54-a26a7f9604ef.png</url>
      <title>Forem: Jahid2121</title>
      <link>https://forem.com/jahid2121</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jahid2121"/>
    <language>en</language>
    <item>
      <title>Journaling is one of the best things you can do to take control of your thoughts</title>
      <dc:creator>Jahid2121</dc:creator>
      <pubDate>Wed, 22 Jan 2025 02:19:47 +0000</pubDate>
      <link>https://forem.com/jahid2121/journaling-is-one-of-the-best-things-you-can-do-to-take-control-of-your-thoughts-5fjg</link>
      <guid>https://forem.com/jahid2121/journaling-is-one-of-the-best-things-you-can-do-to-take-control-of-your-thoughts-5fjg</guid>
      <description>&lt;p&gt;maybe you've found yourself in a situation where you are not feeling well, but you're not sure why. You might be stressed or struck on a problem that you've working on hours without a solution. In these situations, I put my keyboard away and start writing my thoughts down. By doing this, I connect with my inner self, self talk through journaling can significantly boost self-esteem and provide clarity when you're feeling overwhelmed&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>A simple mongoDB trick to save your time</title>
      <dc:creator>Jahid2121</dc:creator>
      <pubDate>Thu, 02 May 2024 06:00:31 +0000</pubDate>
      <link>https://forem.com/jahid2121/a-simple-mongodb-trick-to-save-your-time-36bp</link>
      <guid>https://forem.com/jahid2121/a-simple-mongodb-trick-to-save-your-time-36bp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update all documents with just 2 line of code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes, we need to add a single field to all the documents in the database of a collection. Adding this field one by one can be time-consuming, especially with large documents. Developer often find themselves daunted by this task. But fear not! you can now accomplish this with just two lines of code. &lt;/p&gt;

&lt;p&gt;here's an example - &lt;br&gt;
before integrating this code, consider a single object -&lt;br&gt;
&lt;code&gt;{&lt;br&gt;
"_id": "6565c912dc088bc26ee365d0",&lt;br&gt;
"title": "Grilled Chicken Salad",&lt;br&gt;
"image": "https://i.ibb.co/YbPcf1k/khloe-arledge-V7hibs9xhe4-unsplash.jpg",&lt;br&gt;
"category": "lunch",&lt;br&gt;
"price": 10.99,&lt;br&gt;
"likes": 2,&lt;br&gt;
"reviews": 0,&lt;br&gt;
"name": "Jahid",&lt;br&gt;
"email": "jahidhasan20u@gmail.com"&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Now, add thse following code to the server side - &lt;/p&gt;

&lt;p&gt;// Accessing the collection&lt;br&gt;
const reqMealCollection = client.db("hosteldb").collection("requestedMeals"); &lt;/p&gt;

&lt;p&gt;// Update all documents by adding the 'status' field if it doesn't exist,&lt;br&gt;
// assigning the value "pending" to each new document.&lt;br&gt;
reqMealCollection.updateMany( &lt;br&gt;
  { status: { $exists: false } }, &lt;br&gt;
  { $set: { status: "pending"} }&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;now close the server and start it again. here is the result after implementing this code - &lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
"_id": "6565c912dc088bc26ee365d0",&lt;br&gt;
"title": "Grilled Chicken Salad",&lt;br&gt;
"image": "https://i.ibb.co/YbPcf1k/khloe-arledge-V7hibs9xhe4-unsplash.jpg",&lt;br&gt;
"category": "lunch",&lt;br&gt;
"price": 10.99,&lt;br&gt;
"likes": 2,&lt;br&gt;
"reviews": 0,&lt;br&gt;
"name": "Jahid",&lt;br&gt;
"email": "jahidhasan20u@gmail.com", &lt;br&gt;
"status": "pending" // newly added field&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
And if you want to remove any field, simply use this code: &lt;br&gt;
&lt;code&gt;&lt;br&gt;
// removing status field&lt;br&gt;
{ status: "pending"},&lt;br&gt;
{ $unset: { status: ""} }&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
result - &lt;br&gt;
&lt;code&gt;{&lt;br&gt;
"_id": "6565c912dc088bc26ee365d0",&lt;br&gt;
"title": "Grilled Chicken Salad",&lt;br&gt;
"image": "https://i.ibb.co/YbPcf1k/khloe-arledge-V7hibs9xhe4-unsplash.jpg",&lt;br&gt;
"category": "lunch",&lt;br&gt;
"price": 10.99,&lt;br&gt;
"likes": 2,&lt;br&gt;
"reviews": 0,&lt;br&gt;
"name": "Jahid",&lt;br&gt;
"email": "jahidhasan20u@gmail.com", &lt;br&gt;
// "status" field has been removed&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;feel free to adapt and integrate this approach into your workflow for efficient document management. Thanks me later !&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>mongodb</category>
      <category>productivity</category>
      <category>timesaving</category>
    </item>
    <item>
      <title>The Pros and Cons of Routine for Developers</title>
      <dc:creator>Jahid2121</dc:creator>
      <pubDate>Sat, 30 Mar 2024 01:31:33 +0000</pubDate>
      <link>https://forem.com/jahid2121/the-pros-and-cons-of-routine-for-developers-35ck</link>
      <guid>https://forem.com/jahid2121/the-pros-and-cons-of-routine-for-developers-35ck</guid>
      <description>&lt;p&gt;In my journey through web development, I've come to appreciate the significance of having a routine. Here I want to share some pros and cons of having a routine and why having a routine is much considered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. You can achieve your task:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;when confronted with a multitude of tasks. It  is easy to feel overwhelmed and resort to multi tasking. Having a routine helps prioritize tasks and enables to tackle them one by one. As Dr. Stephen Covey, the author of "The 7 Habits of Highly Effective People," emphasizes, "&lt;em&gt;Put first things first&lt;/em&gt;." Having a routine aids in prioritizing the most crucial task, ensuring it is completed earlier and helping to navigate through the confusion of "Which one first?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Less Stress:&lt;/strong&gt;&lt;br&gt;
Following a routine alleviates the mental burden of juggling numerous tasks simultaneously. By compartmentalizing your day, you minimize uncertainty and cultivates a sense of control, resulting in less stressful work environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Balancing act:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You have time for all your priorities; nothing is left behind. Everything, including health, family relations, learning, and earning, is taken into consideration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Distraction free environment:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In today's digital age, escaping the internet's distractions is nearly impossible. Without a set schedule, you may find yourself veering off track, akin to wandering without direction. Establishing time blocks for tasks like social media or YouTube browsing can help avoid falling into the abyss of online distractions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Routine is constantly changing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As like static data in the website routine is not static. They evolve in response to changing circumstance. Adjusting to new tasks or opportunities may require modifications to your routine, which can be disruptive. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Potential for boredom and fatigue:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;While you establish a routine, you may discover that you're engaged in activities every hour of the day. This can lead to burnout. However, there is a solution: taking a 10-minute break every hour. During this break, refrain from using social media. Instead, consider activities such as walking, stretching, or simply relaxing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Some tasks require significant time:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A routine may not align with a strict timetable when certain tasks demand extensive time commitments within specific deadlines.&lt;/p&gt;

&lt;p&gt;Despite these drawbacks, routines offer significant benefits. Share your thoughts on how routines can either enhance or hinder your life in the comments below.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>routine</category>
      <category>productivity</category>
      <category>distraction</category>
    </item>
  </channel>
</rss>
