<?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: Ahmed Nagi</title>
    <description>The latest articles on Forem by Ahmed Nagi (@nagi).</description>
    <link>https://forem.com/nagi</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%2F538020%2F8f56f193-eabe-4940-86b5-1dd6da926728.jpg</url>
      <title>Forem: Ahmed Nagi</title>
      <link>https://forem.com/nagi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nagi"/>
    <language>en</language>
    <item>
      <title>Getting started with contributing to open source – Real world example</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Thu, 21 Apr 2022 17:19:53 +0000</pubDate>
      <link>https://forem.com/nagi/getting-started-with-contributing-to-open-source-real-world-example-3kpp</link>
      <guid>https://forem.com/nagi/getting-started-with-contributing-to-open-source-real-world-example-3kpp</guid>
      <description>&lt;p&gt;Hey awesome people,&lt;/p&gt;

&lt;p&gt;This is your step-by-step detailed with images guide on getting started contributing to opensource using real world package on github.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to find something to contribute on
&lt;/h2&gt;

&lt;p&gt;Community make it super easy to get started with opensource you can even start by fix typos on &lt;code&gt;Readme&lt;/code&gt; files in any repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  When you're a complete beginner
&lt;/h3&gt;

&lt;p&gt;Although I encourage you to get involved in opensource community as soon as possible, I recommend starting a project with your favorite tech stack or language.&lt;/p&gt;

&lt;p&gt;Get better understanding of what is going on inside these projects first before contributing.&lt;/p&gt;

&lt;p&gt;👉 Visit &lt;a href="https://goodfirstissue.dev/" rel="noopener noreferrer"&gt;good first issue&lt;/a&gt; and pic your favorite &lt;strong&gt;language or framework&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvct3ajamdse8qvk0dzfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvct3ajamdse8qvk0dzfw.png" alt="Good first issue"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 Click on the project you like.&lt;/p&gt;

&lt;p&gt;👉 Open &lt;code&gt;Issues&lt;/code&gt; tap on the project's github page.&lt;/p&gt;

&lt;p&gt;👉 In the search field enter this phrase &lt;code&gt;is:issue is:open #good label:"good first issue"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ahmednagi.com/getting-started-with-opensource/" rel="noopener noreferrer"&gt;Continue reading&lt;/a&gt; ... 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ahmednagi.com/getting-started-with-opensource/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmquqqqv6e5zb9wa4hgib.png" alt="Ahmednagi.com"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shallow Copy vs Deep Copy in Javascript</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Thu, 21 Apr 2022 17:13:07 +0000</pubDate>
      <link>https://forem.com/nagi/shallow-copy-vs-deep-copy-in-javascript-53d1</link>
      <guid>https://forem.com/nagi/shallow-copy-vs-deep-copy-in-javascript-53d1</guid>
      <description>&lt;p&gt;Copying objects in javasceript to manipulate  is common best practice.&lt;/p&gt;

&lt;p&gt;✅ When you copy javascript objects or arrays keep in mind that only the outer properties are actually copied while the nested properties inside them only get referenced.&lt;/p&gt;

&lt;p&gt;javascript default copy mode is shallow copy, to save on memory. But in the same time introduce a weird behavior.&lt;/p&gt;

&lt;p&gt;💥When you try to change a property of a shallow copied object the change will effect the original object, that causes nasty bugs that get you stuck on for hours.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmm6t4cw04804jeoymxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmm6t4cw04804jeoymxh.png" alt="Shallow Copy vs Deep Copy in Javascript"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Difference between Service and Service Provider</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Tue, 19 Apr 2022 17:58:14 +0000</pubDate>
      <link>https://forem.com/nagi/difference-between-service-and-service-provider-196n</link>
      <guid>https://forem.com/nagi/difference-between-service-and-service-provider-196n</guid>
      <description>&lt;p&gt;This an Interview Question&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqj5g74t32us83khzfrad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqj5g74t32us83khzfrad.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👷‍♀️ Service: A class that you pass data to and get something in return or ask to do some work.&lt;/p&gt;

&lt;p&gt;⚡ Provider: A class used to bootstrap the service, i.e. prepare it, read some config or bind an implementation.&lt;/p&gt;

&lt;p&gt;Code example 👇 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fty08abvdgjf2z75fmg6a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fty08abvdgjf2z75fmg6a.png" alt="Code example"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>90 Days are all you need to get a web developer job</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Mon, 18 Apr 2022 17:52:54 +0000</pubDate>
      <link>https://forem.com/nagi/90-days-are-all-you-need-to-get-a-web-developer-job-4nd6</link>
      <guid>https://forem.com/nagi/90-days-are-all-you-need-to-get-a-web-developer-job-4nd6</guid>
      <description>&lt;p&gt;🚶‍♂️🚶‍♀️ A step by step guide to escape tutorial hell&lt;/p&gt;

&lt;p&gt;It's a summary of my journey in the frontend world from not knowing how to style a button to design full blowing enterprise apps.&lt;/p&gt;

&lt;p&gt;✅ This guide is your step-by-step plan to getting real at learning web development and getting a real job in 3 months.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roadmap
&lt;/h2&gt;

&lt;p&gt;👇&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ys9iRY8c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khm88q8llh4f2g1apbrc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ys9iRY8c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/khm88q8llh4f2g1apbrc.png" alt="Roadmap" width="644" height="896"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Do these things consistently
&lt;/h3&gt;

&lt;p&gt;If you're serious let's start with the less relative things yet effective:&lt;/p&gt;

&lt;p&gt;🛌 Sleep at least 7 hours a day and wake up early typically 6 AM everyday.&lt;br&gt;
🥤 Drink a lot of water. Your brain is swimming in water and needs a lot of it to function properly.&lt;br&gt;
🍎 Have natural sugars like fruits.&lt;br&gt;
🤸‍♂️ Do some light exercises in the morning.&lt;br&gt;
🔥 Most importantly you have to work at least 12 hours a day for 90 days and take Fridays off.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Learn the absolute basics
&lt;/h3&gt;

&lt;p&gt;Before diving into HTML/CSS/JS and such you should learn the absolute basics first:&lt;/p&gt;

&lt;h4&gt;
  
  
  Days 1 - 2 : Web Concepts
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: Don't just watch 45 mins videos, instead read some blog posts and grasp the general concepts.&lt;/p&gt;

&lt;p&gt;🌐 What is web?&lt;br&gt;
🖱️ What is a HTTP request?&lt;br&gt;
✅ What is HTTP methods and headers?&lt;br&gt;
✅ How the browser works?&lt;br&gt;
🧱 What is HTML and how it works?&lt;/p&gt;

&lt;h4&gt;
  
  
  Days 3 - 5: HTML Basics
&lt;/h4&gt;

&lt;p&gt;🧱 Learn HTML basics including. (what is the difference between form id and class).&lt;br&gt;
🧱 Why some HTML elements doesn't have closing tag?&lt;br&gt;
🌳 Basics of HTML DOM tree. (Important!)&lt;/p&gt;

&lt;h4&gt;
  
  
  Apply
&lt;/h4&gt;

&lt;p&gt;🏗️ Build simple HTML page include all of what you have learned in it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Days 6 - 10: CSS Basics
&lt;/h4&gt;

&lt;p&gt;✅ Learn VS Code basics. A basic crash course will do.&lt;br&gt;
✅ Learn about Chrome dev-tools.&lt;br&gt;
🎨 What is CSS?&lt;br&gt;
🎨 CSS basics.&lt;br&gt;
🎨 What is CSS media query?&lt;br&gt;
🎨 CSS selectors.&lt;br&gt;
🎨 CSS basic best practices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ahmednagi.com/90-days-to-web-dev-job/"&gt;Read more&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Meet Oilly your friendly telegram bot that will save your car</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Thu, 07 Apr 2022 01:37:42 +0000</pubDate>
      <link>https://forem.com/nagi/meet-oilly-your-friendly-telegram-bot-that-will-save-your-car-1db3</link>
      <guid>https://forem.com/nagi/meet-oilly-your-friendly-telegram-bot-that-will-save-your-car-1db3</guid>
      <description>&lt;p&gt;Hey dear fellow developers,&lt;/p&gt;

&lt;p&gt;I have a problem remember changing my car oil, I almost every time drive 2000 km more or completely forget the fact that It's been a year since last change.&lt;/p&gt;

&lt;p&gt;I needed it someone to remind me, someone who I can relay on...&lt;/p&gt;

&lt;p&gt;Meet &lt;a href="https://t.me/OillyBot"&gt;@OillyBot&lt;/a&gt; your friendly Telegram bot that will always notify you to change your oil on the right time!&lt;/p&gt;

&lt;p&gt;See a gif demo 👉 &lt;a href="https://imgur.com/a/rSNZohL"&gt;https://imgur.com/a/rSNZohL&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built in 5 days using &lt;strong&gt;Nodejs&lt;/strong&gt; as the backend, &lt;strong&gt;Firebase&lt;/strong&gt; as the database, &lt;strong&gt;Vercel&lt;/strong&gt; as the hosting and &lt;strong&gt;EasyCron&lt;/strong&gt; as the cronjob server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;%100 free to maintain.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I teased it up and shared my development journey in 4 part series here on dev community and my website &lt;a href="https://ahmednagi.com"&gt;ahmednagi.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would highly appreciate your feedback on it.&lt;/p&gt;

&lt;p&gt;You can find it on telegram by username @OillyBot or by using this link &lt;a href="https://t.me/OillyBot"&gt;t.me/OillyBot&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>node</category>
      <category>firebase</category>
    </item>
    <item>
      <title>Part 3: I'm building a telegram bot to remind me changing my car oil</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Mon, 04 Apr 2022 12:55:56 +0000</pubDate>
      <link>https://forem.com/nagi/part-3-im-building-a-telegram-bot-to-remind-me-changing-my-car-oil-55k7</link>
      <guid>https://forem.com/nagi/part-3-im-building-a-telegram-bot-to-remind-me-changing-my-car-oil-55k7</guid>
      <description>&lt;p&gt;Welcome to the part 3 of my journey to create a telegram bot that will remind me changing my car oil.&lt;/p&gt;

&lt;p&gt;Checkout &lt;a href="https://ahmednagi.com/oilly-telegram-bot"&gt;part 1&lt;/a&gt; and &lt;a href="https://ahmednagi.com/oilly-telegram-bot-part-2"&gt;part 2&lt;/a&gt; for context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo Preview
&lt;/h2&gt;

&lt;p&gt;I got the bot to ask questions and record answers. Here's a demo 👇!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ze0VClr7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8avvrdqr4kot9okwj2ym.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ze0VClr7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8avvrdqr4kot9okwj2ym.gif" alt="Demo" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Full demo can be found on Imugr 👉 &lt;a href="https://imgur.com/a/gPkI95A"&gt;https://imgur.com/a/gPkI95A&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask Questions and record answers
&lt;/h2&gt;

&lt;p&gt;Oilly now can ask questions like, "what is your current mileage?", and make sure to correctly record the answers in the database.&lt;/p&gt;

&lt;h3&gt;
  
  
  Telegram persistance problem
&lt;/h3&gt;

&lt;p&gt;Unfortunately telegram wont let you send any custom data with the message you have to debend on the text you send to record answers and here where I get stuck for 3 hours trying to find a way around.&lt;/p&gt;

&lt;p&gt;Let me explain the problem in another way:&lt;/p&gt;

&lt;p&gt;When Oilly asks the user &lt;strong&gt;What is the current mileage in (km) as shown in your car dashboard?&lt;/strong&gt; and waits for an answer there's no way for me to know wither the following text will be answer for this question or not because telegram doesn't return the message id in this case the question id, nor let you send custom data with the message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="nx"&gt;bot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sendMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;What is the current mileage in (km) as shown in your car dashboard?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;reply_markup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// Options that doesn't contain custom data&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Continue reading with images and visual aids on my blog &lt;a href="https://ahmednagi.com/oilly-telegram-bot-part-3"&gt;Ahmednagi.com/oilly-telegram-bot-part-3&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Part 2: I'm building a telegram bot to remind me changing my car oil</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Sat, 02 Apr 2022 21:46:46 +0000</pubDate>
      <link>https://forem.com/nagi/part-2-im-building-a-telegram-bot-to-remind-me-changing-my-car-oil-fjd</link>
      <guid>https://forem.com/nagi/part-2-im-building-a-telegram-bot-to-remind-me-changing-my-car-oil-fjd</guid>
      <description>&lt;p&gt;Part 2 of my journey to create a telegram bot that will remind changing my car oil for me.&lt;/p&gt;

&lt;p&gt;Today was productive. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I were able to produce some basic output. &lt;/li&gt;
&lt;li&gt;I figured out the stack I'm going to use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I decided to use for the backend nodejs since it is the easiest to get started with.&lt;/p&gt;

&lt;p&gt;For the database I decided to go with firebase for the generous free tire and realtimeness.&lt;/p&gt;

&lt;p&gt;npm package: node-telegram-bot-api as the wrapper to work with the telegram bot api.&lt;/p&gt;

&lt;p&gt;I wanted to use Vercel for development but it kinda sucks with debuging so I used ngrok to tunnel requests to my local node server.&lt;/p&gt;

&lt;p&gt;Didn't want to use frameworks or complicated file structure I stucked with the simplest working structure 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hru6d3zN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9s8v7uwwksolddgo3rdr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hru6d3zN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9s8v7uwwksolddgo3rdr.png" alt="Project structure" width="492" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Spent most of the day lurking around telegram bot API, understanding how to send simple messages and get responses. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://core.telegram.org/bots/api/"&gt;https://core.telegram.org/bots/api/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Firebase will store the state like only display welcome message once to the users.&lt;/p&gt;

&lt;p&gt;EasyCron will hit the server every 3 hours to calculate how needs to be reminded&lt;/p&gt;

&lt;p&gt;&lt;a href="https://easycron.com"&gt;https://easycron.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I see piece falling into their place, It's been only a one day and I could tell that I finished 50%. &lt;/p&gt;

&lt;p&gt;I'll keep posting about the details of this light piece of software.&lt;/p&gt;

&lt;p&gt;Follow for more...&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>node</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I'm building a telegram bot to remind me changing my car oil</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Fri, 01 Apr 2022 22:36:15 +0000</pubDate>
      <link>https://forem.com/nagi/im-building-a-telegram-bot-to-remind-me-changing-my-car-oil-2dan</link>
      <guid>https://forem.com/nagi/im-building-a-telegram-bot-to-remind-me-changing-my-car-oil-2dan</guid>
      <description>&lt;p&gt;I hate to remember changing my car oil.&lt;br&gt;
Too many minor things to remember in life already!&lt;/p&gt;

&lt;p&gt;So I decided to build a simple Telegram bot that remembers changing the oil for me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I want to share my thought process before actually coding it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I want this to be as simple as possible and free as possible, practically costing $0 to maintain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Oilly&lt;/strong&gt; will be his name, with a headline that says: &lt;/p&gt;

&lt;p&gt;"Oilly will help you preserve your car engine by reminding you to change the oil, so you have one less thing to remember".&lt;/p&gt;

&lt;h2&gt;
  
  
  Oilly will interact with the user ask them:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Current mileage&lt;/li&gt;
&lt;li&gt;Roughly estimate the last time the oil has been changed.&lt;/li&gt;
&lt;li&gt;The mileage in the last time oil changed.&lt;/li&gt;
&lt;li&gt;What is the type of the last changed oil 5k, 10k, 15k?&lt;/li&gt;
&lt;li&gt;How frequent they change the oil 3 mo, 6 mo?&lt;/li&gt;
&lt;li&gt;Have they changed the oil filter in the last oil change?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Bot will respond with "Thanks, based on the information you gave me I'll notify you!".&lt;/p&gt;

&lt;h2&gt;
  
  
  How to calculate the oil change (research)
&lt;/h2&gt;

&lt;p&gt;Upper limit 10,000 KM or 6 months whichever comes first.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;every 6 months&lt;/li&gt;
&lt;li&gt;every 3 months&lt;/li&gt;
&lt;li&gt;every 5000 km or 3 months (recommended)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  User input example (my real usage):
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;current mileage: 25,258&lt;/li&gt;
&lt;li&gt;last time changed oil: 2 months ago&lt;/li&gt;
&lt;li&gt;mileage last before change: 21,201&lt;/li&gt;
&lt;li&gt;Oil type: 5k&lt;/li&gt;
&lt;li&gt;Change oil frequency: every 3 months&lt;/li&gt;
&lt;li&gt;have you changed the oil filter: No&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Simple Process: First state the facts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Calculate how long the user will take to reach 5k mileage:&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ideal mileage usage 5k in 3 months.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Current mileage - mileage last before change =&amp;gt; 25,258 - 21,201 = 4,056 in 2 months.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avg mileage per day =&amp;gt; 4056 /60 = 67.6 KM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mileages left in distance unit =&amp;gt; 5000 - 4,056 = 944 KM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mileage left in time unit =&amp;gt; 1 months&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Change Oil filter last time: NO, so this time change it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  My approach:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Easiest way to approach this is by sending notification after 1 month.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Or Mileage left (944) / avg usage (67.6) = 14 days.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maybe sending the user notification after 14 days that says if you reach (25,258 + 944 = 26,202 KM) it's time to change.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the user says no, fall back to 1 month change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I'm trying to get some hold over this process, I would appreciate your take on this whole thing.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>tutorial</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to properly use abandoned libraries</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Wed, 30 Mar 2022 10:20:31 +0000</pubDate>
      <link>https://forem.com/nagi/how-to-properly-use-abandoned-libraries-34ng</link>
      <guid>https://forem.com/nagi/how-to-properly-use-abandoned-libraries-34ng</guid>
      <description>&lt;p&gt;In some situations I get stuck using old abandoned libraries from GitHub, many of which have multiple forks maintained by other developers who got stuck using them as well 😂&lt;/p&gt;

&lt;p&gt;Before pulling the outdated source check this awesome free tool &lt;a href="https://techgaun.github.io/active-forks/index.html"&gt;Active GitHub Forks&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Never failed me to find an active repo that at least updated it's dependencies tree.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://techgaun.github.io/active-forks/index.html#https://github.com/tohidplus/laravel-vue-translation"&gt;Recent Usage Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find more tips and content like this on &lt;a href="https://twitter.com/nagiworks"&gt;Twitter&lt;/a&gt; or visit my blog &lt;a href="https://ahmednagi.com"&gt;ahmednagi.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The Extensive Guide to Create Beautiful Social Media Headers Using Tailwindcss</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Mon, 28 Mar 2022 12:56:17 +0000</pubDate>
      <link>https://forem.com/nagi/the-extensive-guide-to-create-beautiful-social-media-headers-using-tailwindcss-5e30</link>
      <guid>https://forem.com/nagi/the-extensive-guide-to-create-beautiful-social-media-headers-using-tailwindcss-5e30</guid>
      <description>&lt;p&gt;Hey everyone, let me show you how I created my Twitter headers using Tailwind CSS.&lt;/p&gt;

&lt;p&gt;🔥 It took me 18 hours to write this detailed guide.&lt;/p&gt;

&lt;p&gt;I would appreciate a like or RT if you find it insightful😁&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ahmednagi.com/create-social-media-headers/"&gt;Read the full blog on my website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📩 My DM is open for any suggestions or questions. &lt;br&gt;
&lt;a href="https://twitter.com/nagiworks"&gt;Twitter: nagiworks&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>tailwindcss</category>
      <category>tutorial</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>I created twitter header using TailwindCSS</title>
      <dc:creator>Ahmed Nagi</dc:creator>
      <pubDate>Sun, 27 Mar 2022 08:31:18 +0000</pubDate>
      <link>https://forem.com/nagi/i-created-twitter-header-using-tailwindcss-4kik</link>
      <guid>https://forem.com/nagi/i-created-twitter-header-using-tailwindcss-4kik</guid>
      <description>&lt;p&gt;Checkout my new social media header made with TailwindCSS. Here is some facts 👇&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only used SVGs for the logos and the curly brace at the right.&lt;/li&gt;
&lt;li&gt;No custom css or fancy javascript.&lt;/li&gt;
&lt;li&gt;I had fun for 3 hours making it.&lt;/li&gt;
&lt;li&gt;Code available on 👇&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://play.tailwindcss.com/YpEyNjbSOF?layout=horizontal"&gt;TwilwindCss Play&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wanna know how I have done it?&lt;br&gt;
👉 Checkout &lt;a href="https://dev.to/nagi/the-extensive-guide-to-create-beautiful-social-media-headers-using-tailwindcss-5e30"&gt;The Extensive Guide to Create Beautiful Social Media Headers Using Tailwindcss&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>css</category>
    </item>
  </channel>
</rss>
