<?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: Divyanshu Hoon</title>
    <description>The latest articles on Forem by Divyanshu Hoon (@divyanshuhoon).</description>
    <link>https://forem.com/divyanshuhoon</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%2F1279309%2Fee975d0f-45a5-49b3-bd89-4541cc84c9ca.png</url>
      <title>Forem: Divyanshu Hoon</title>
      <link>https://forem.com/divyanshuhoon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/divyanshuhoon"/>
    <language>en</language>
    <item>
      <title>How to add a Pre-loader in your webpage</title>
      <dc:creator>Divyanshu Hoon</dc:creator>
      <pubDate>Mon, 12 Feb 2024 22:46:44 +0000</pubDate>
      <link>https://forem.com/divyanshuhoon/how-to-add-a-pre-loader-in-your-webpage-ld3</link>
      <guid>https://forem.com/divyanshuhoon/how-to-add-a-pre-loader-in-your-webpage-ld3</guid>
      <description>&lt;p&gt;Loader/Throbber/Spinner&lt;br&gt;
GIFchrome-capture&lt;/p&gt;

&lt;p&gt;Essentially, pre-loaders (also known as loaders) are what you see on the screen while the rest of the page's content is still loading. Pre-loaders are often simple or complex animations that are used to keep visitors entertained while server operations finish processing.&lt;/p&gt;

&lt;p&gt;In this tutorial, I have used SVG (Scalable Vector Graphics) for pre-loading animation. It's resolution independent and responsive. Images can be scaled the same way we scale all other elements in responsive web design.&lt;/p&gt;

&lt;p&gt;So, to design the SVG, I have used Figma which is used for web-based graphics editing and user interface design app.&lt;/p&gt;

&lt;p&gt;After editing and importing your frame as SVG, you now need to animate it. For basic animations, you can either use svgartista or svgator. If you want your own custom animations you can do it by using @keyframes in CSS.&lt;/p&gt;

&lt;p&gt;This is a Pre-loader Pen, which I created using above methods and used it in my own portfolio website.&lt;/p&gt;

&lt;p&gt;Now, how do we add this on our website?&lt;/p&gt;

&lt;p&gt;Follow these steps to add a pre-loader&lt;br&gt;
Create a loader.html and loader.css file and copy over the code for both HTML and CSS and then create a wrapper around it.&lt;br&gt;
HTML&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;div class="loader-wrapper"&amp;gt;
     &amp;lt;div class="loader"&amp;gt; &amp;lt;svg /*svg code*/&amp;gt;&amp;lt;/svg&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;CSS&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; .loader-wrapper {
      width: 100%;
      height: 100%;
      position: fixed;
      top: 0;
      left: 0;
      background-color: whitesmoke;
      display: block;
      justify-content: center;
      align-items: center;
      z-index: 999;
      overflow: hidden;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;br&gt;
If done correctly, this is what you should get.&lt;/p&gt;

&lt;p&gt;Screenshot (74)&lt;/p&gt;

&lt;p&gt;Load Event&lt;br&gt;
The loading Animation is ready. Next we’ll need hide it when the loading is complete. We can do that by listening to window load event which will trigger when all the elements have been completely loaded. Then use jQuery fadeOut method to hide the loader.&lt;/p&gt;

&lt;p&gt;Make sure you have jQuery included in your project.&lt;/p&gt;

 

&lt;p&gt;Then to include loading animation page in your other HTML document use a div tag with id="loading".&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
In CSS file, import loader.css using&lt;br&gt;
@import url(/assets/css/loader.css);&lt;br&gt;
In JavaScript file, you have to call loader.html using&lt;br&gt;
$.get("/assets/html/loader.html", function(data){&lt;br&gt;
  $("#loading").replaceWith(data);&lt;br&gt;
});&lt;br&gt;
Then to trigger the loading animation everytime you load a page use this code:&lt;br&gt;
$(window).on('load', function(){&lt;br&gt;
  setTimeout(removeLoader, 2000); //wait for page load PLUS two seconds.&lt;br&gt;
});&lt;br&gt;
function removeLoader(){&lt;br&gt;
    $( ".loader-wrapper" ).fadeOut(500, function() {&lt;br&gt;
      // fadeOut complete. Remove the loading div&lt;br&gt;
      $( ".loader-wrapper" ).remove(); //makes page more lightweight &lt;br&gt;
  });&lt;br&gt;&lt;br&gt;
}&lt;br&gt;
And that’s it! Very simple and straightforward😉✌&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>devops</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Making Telegram Bots with Python</title>
      <dc:creator>Divyanshu Hoon</dc:creator>
      <pubDate>Mon, 12 Feb 2024 22:44:37 +0000</pubDate>
      <link>https://forem.com/divyanshuhoon/making-telegram-bots-with-python-3acg</link>
      <guid>https://forem.com/divyanshuhoon/making-telegram-bots-with-python-3acg</guid>
      <description>&lt;p&gt;Course Outline&lt;br&gt;
Prerequisite Knowledge and Requirements&lt;/p&gt;

&lt;p&gt;Basic python knowledge&lt;br&gt;
Telegram Account&lt;br&gt;
About Course&lt;/p&gt;

&lt;p&gt;In this course, you will start creating a bot from scratch, discovering all possible settings to utilize all power of Bot API and creating a real-world application. All this by using Python and Telegram Bot&lt;/p&gt;

&lt;p&gt;Codes / Projects&lt;/p&gt;

&lt;p&gt;All the snippets and projects related to this course will be found in projects directory&lt;/p&gt;

&lt;p&gt;NOTE : If you will be making any educational project regarding this course, I would like to encourage you to send a PR regarding the same, here&lt;/p&gt;

&lt;p&gt;What are Bots&lt;br&gt;
Simple telegram accounts operated by an application&lt;br&gt;
Not actually designed for chatting&lt;br&gt;
Can be used to simplify the task&lt;br&gt;
Teach&lt;br&gt;
Play&lt;br&gt;
Search&lt;br&gt;
Broadcast&lt;br&gt;
Remind&lt;br&gt;
Connect&lt;br&gt;
Users can interact with them via&lt;br&gt;
Message&lt;br&gt;
Emoticons&lt;br&gt;
Commands&lt;br&gt;
Inline requests&lt;br&gt;
Setting up Telegram Bot&lt;br&gt;
Open telegram and search for BotFather&lt;br&gt;
Send /start command to start and associate the account with yours&lt;br&gt;
Send /help command to show the help&lt;br&gt;
Send /newbot command and follow the instruction&lt;br&gt;
Send /mybots command to list your bot, select the desired bot&lt;br&gt;
Click on API Token&lt;br&gt;
Understanding Other Bot Settings&lt;br&gt;
Send /mybots command to list your bot, select the desired bot&lt;br&gt;
Click on "Bot Settings" and you will see various options.&lt;br&gt;
Click on "Inline Mode". If you want the bot to accept inline messages beyond the commands.&lt;br&gt;
Now you can click on Back to Bot button and click on Edit Bot button. Here you can customize your bots like setting a bot description (what it does, what it is used for etc), setting a bot about and profile picture.&lt;br&gt;
NOTE: While changing the profile picture, botfather expects you to upload a valid image file.&lt;/p&gt;

&lt;p&gt;Limitation of the Bot&lt;br&gt;
Only user can initiate the chat&lt;br&gt;
The download limit is 20MB and upload limit is 50MB only&lt;br&gt;
Send messages limit is capped up to 30 msg per second. However, you can ask @botsupport to increase it.&lt;br&gt;
With this limitation, comes another power, bots can edit own messages and another's messages in the channel where the bot has admin rights&lt;/p&gt;

&lt;p&gt;Getting messages from Telegram&lt;br&gt;
There are two ways to get user messages from telegram.&lt;/p&gt;

&lt;p&gt;Polling&lt;/p&gt;

&lt;p&gt;It's a way of asking Telegram every X seconds whether any new message has come, and receive messages or asks later from telegram.&lt;/p&gt;

&lt;p&gt;Web Hooks&lt;/p&gt;

&lt;p&gt;It's a way in which telegram sends all updates to the URL that has been configured to accept messages as soon as the user sends new messages.&lt;/p&gt;

&lt;p&gt;HTTP Interface of Bots API&lt;br&gt;
Documentation: &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;Available Method: &lt;a href="https://core.telegram.org/bots/api#available-methods"&gt;https://core.telegram.org/bots/api#available-methods&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Base URL: &lt;a href="https://api.telegram.org/bot%5BBOT_API_KEY%5D/%5BmethodName%5D"&gt;https://api.telegram.org/bot[BOT_API_KEY]/[methodName]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Getting bot description&lt;br&gt;
Method Name: getMe&lt;/p&gt;

&lt;p&gt;In my case,&lt;br&gt;
{&lt;br&gt;
  "ok": true,&lt;br&gt;
  "result": {&lt;br&gt;
    "id": 920296790,&lt;br&gt;
    "is_bot": true,&lt;br&gt;
    "first_name": "TELE BOT",&lt;br&gt;
    "username": "tel_ebot",&lt;br&gt;
    "can_join_groups": true,&lt;br&gt;
    "can_read_all_group_messages": false,&lt;br&gt;
    "supports_inline_queries": false&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Getting new messages&lt;br&gt;
Available Methods: &lt;a href="https://core.telegram.org/bots/api#getting-updates"&gt;https://core.telegram.org/bots/api#getting-updates&lt;/a&gt;&lt;br&gt;
Method Name: getUpdates&lt;/p&gt;

&lt;p&gt;In my case&lt;br&gt;
{&lt;br&gt;
  "ok": true,&lt;br&gt;
  "result": [&lt;br&gt;
    {&lt;br&gt;
      "update_id": 643663200,&lt;br&gt;
      "message": {&lt;br&gt;
        "message_id": 3,&lt;br&gt;
        "from": {&lt;br&gt;
          "id": 517852228,&lt;br&gt;
          "is_bot": false,&lt;br&gt;
          "first_name": "Gurkirat",&lt;br&gt;
          "last_name": "Singh",&lt;br&gt;
          "username": "username_of_the_sender",&lt;br&gt;
          "language_code": "en"&lt;br&gt;
        },&lt;br&gt;
        "chat": {&lt;br&gt;
          "id": 517852228,&lt;br&gt;
          "first_name": "Gurkirat",&lt;br&gt;
          "last_name": "Singh",&lt;br&gt;
          "username": "username_of_the_sender",&lt;br&gt;
          "type": "private"&lt;br&gt;
        },&lt;br&gt;
        "date": 1586779436,&lt;br&gt;
        "text": "hello"&lt;br&gt;
      }&lt;br&gt;
    }&lt;br&gt;
  ]&lt;br&gt;
}&lt;br&gt;
More methods on Get Updates: &lt;a href="https://core.telegram.org/bots/api#getting-updates"&gt;https://core.telegram.org/bots/api#getting-updates&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sending Messages to the User&lt;br&gt;
Method Name: sendMessage&lt;/p&gt;

&lt;p&gt;In this, you will see me creating an echo bot that will be listening to all the messages sent by the user. I will then read the last message (-1 index in the python list) and send the same message with the format "You send me "{MESSAGE_TEXT}"" message.&lt;/p&gt;

&lt;p&gt;The code is self-explanatory, and I have added some comments. However, if you couldn't get anything, leave a comment&lt;br&gt;
import urllib.request as request&lt;br&gt;
from urllib.error import HTTPError&lt;br&gt;
from http.client import HTTPResponse&lt;br&gt;
from typing import Dict, List, Union&lt;br&gt;
import json&lt;br&gt;
from datetime import datetime&lt;br&gt;
import signal&lt;br&gt;
import os&lt;/p&gt;

&lt;p&gt;signal.signal(signal.SIGINT, signal.SIG_DFL)&lt;/p&gt;

&lt;p&gt;class TelegramEcho:&lt;br&gt;
    def &lt;strong&gt;init&lt;/strong&gt;(self, TG_KEY: str):&lt;br&gt;
        self.TG_URL = "&lt;a href="https://api.telegram.org/bot%7Bkey%7D/%7Bmethod%7D"&gt;https://api.telegram.org/bot{key}/{method}&lt;/a&gt;"&lt;br&gt;
        self.TG_KEY = TG_KEY&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    self.__last = None
    self.__last_time = None
    pass

def run(self):
    """
    method to handle the incoming message and the send echo message to the user
    """
    while True:
        try:
            # getting the incoming data
            incoming = self.__handle_incoming()

            # checking if incoming message_id is same as of last, then skip
            if self.__last == incoming["message"]["message_id"]:
                continue
            else:
                self.__last = incoming["message"]["message_id"]

            # adding more validation to prevent messaging the last message whenever the polling starts
            if not self.__last_time:
                self.__last_time = incoming["message"]["date"]
                continue
            elif self.__last_time &amp;lt; incoming["message"]["date"]:
                self.__last_time = incoming["message"]["date"]
            else:
                continue

            # finally printing the incoming message
            self.__print_incoming(incoming)

            # now sending the echo message
            outgoing = self.__handle_outgoing(
                incoming["message"]["chat"]["id"],
                incoming["message"]["text"])

            # finally printing the outgoing message
            self.__print_outgoing(outgoing)

            pass
        except (HTTPError, IndexError):
            continue
        pass
    pass

def __handle_incoming(self) -&amp;gt; Dict[str, Union[int, str]]:
    """
    method fetch the recent messages
    """

    # getting all messages
    getUpdates = request.urlopen(
        self.TG_URL.format(key=self.TG_KEY, method="getUpdates"))

    # parsing results
    results: List[Dict[str, Union[int, str]]] = json.loads(
        getUpdates.read().decode())["result"]

    # getting the last error
    return results[-1]

def __print_incoming(self, incoming: Dict[str, Union[int, str]]):
    """
    method to print the incoming message on console
    """
    print("[&amp;lt;&amp;lt;&amp;lt;] Message Recieved on %s" % datetime.fromtimestamp(
        incoming["message"]["date"]).strftime("%Y-%m-%d %H:%M:%S"))
    print("\tText: %s" % incoming["message"]["text"])
    print("\tFrom: %s" %
          incoming["message"]["from"].get("first_name", "") + " " +
          incoming["message"]["from"].get("last_name", ""))
    print("\tMessage ID: %d" % incoming["message"]["message_id"])
    print("-" * os.get_terminal_size().columns)
    pass

def __handle_outgoing(self, chat_id: int,
                      message_txt: str) -&amp;gt; Dict[str, Union[int, str]]:
    """
    method to send the echo message to the same chat
    """

    # making the post data
    _data: Dict[str, Union[int, str]] = {
        "chat_id":
        chat_id,
        "text":
        "You sent me \"{MESSAGE_TEXT}\"".format(MESSAGE_TEXT=message_txt)
    }

    # creating the request
    _request: request.Request = request.Request(
        self.TG_URL.format(key=self.TG_KEY, method="sendMessage"),
        data=json.dumps(_data).encode('utf8'),
        headers={"Content-Type": "application/json"})

    # sending HTTP request, for sending message to the user
    sendMessage: HTTPResponse = request.urlopen(_request)
    result: Dict[str, Union[int, str]] = json.loads(
        sendMessage.read().decode())["result"]
    return result

def __print_outgoing(self, outgoing):
    """
    method to print outgoing data on the console
    """
    print("[&amp;gt;&amp;gt;&amp;gt;] Message Send on %s" % datetime.fromtimestamp(
        outgoing["date"]).strftime("%Y-%m-%d %H:%M:%S"))
    print("\tText: %s" % outgoing["text"])
    print("\tFrom: %s" % outgoing["from"]["first_name"])
    print("\tMessage ID: %d" % outgoing["message_id"])
    print("-" * os.get_terminal_size().columns)
    pass

pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;if &lt;strong&gt;name&lt;/strong&gt; == "&lt;strong&gt;main&lt;/strong&gt;":&lt;br&gt;
    tg = TelegramEcho("YOUR API KEY")&lt;br&gt;
    tg.run()&lt;br&gt;
Make sure you add the API Key before running this code. After running the above code, you will get the output like below,&lt;/p&gt;

&lt;p&gt;Telegram Bot Libraries&lt;br&gt;
As you have seen, telegram provides a plethora of methods and APIs to handle the bot through any language, the open-source community has developed a python client using these API under the hood to increase developer's productivity.&lt;/p&gt;

&lt;p&gt;The one I will be using is python-telegram-bot. While making this course, it has approx. 10k stars, 38 open issues and last commit was made 2 days ago&lt;/p&gt;

&lt;p&gt;Installing the Module&lt;/p&gt;

&lt;h1&gt;
  
  
  via pip
&lt;/h1&gt;

&lt;p&gt;pip install -U python-telegram-bot&lt;/p&gt;

&lt;h1&gt;
  
  
  via conda
&lt;/h1&gt;

&lt;p&gt;conda install -c conda-forge python-telegram-bot&lt;br&gt;
Glance of the Usage&lt;/p&gt;

&lt;p&gt;In this I will be implementing get_me method, returning the bot details&lt;br&gt;
from telegram import Bot&lt;/p&gt;

&lt;h1&gt;
  
  
  initializing the bot with API
&lt;/h1&gt;

&lt;p&gt;bot = Bot("API KEY")&lt;/p&gt;

&lt;h1&gt;
  
  
  getting the bot details
&lt;/h1&gt;

&lt;p&gt;print(bot.get_me())&lt;br&gt;
How fascinating, the developers encapsulated all the backend, letting other developers write neat and clone. It not only provides neat code but also makes payment processing, handlers, and other more features even beyond sending HTTP Requests&lt;/p&gt;

&lt;p&gt;The complete documentation of python-telegram-bot: &lt;a href="https://python-telegram-bot.readthedocs.io/en/stable/"&gt;https://python-telegram-bot.readthedocs.io/en/stable/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using Handlers on Commands&lt;br&gt;
I hope you would have created some commands, now let's make the bot handle those&lt;/p&gt;

&lt;p&gt;The library python-telegram-bot provides various Handlers from which I will be using CommandHandler&lt;br&gt;
from telegram.ext.commandhandler import CommandHandler&lt;br&gt;
from telegram.ext.updater import Updater&lt;br&gt;
from telegram.ext.dispatcher import Dispatcher&lt;br&gt;
from telegram.update import Update&lt;br&gt;
from telegram.ext.callbackcontext import CallbackContext&lt;br&gt;
from telegram.bot import Bot&lt;/p&gt;

&lt;h1&gt;
  
  
  initializing an updator
&lt;/h1&gt;

&lt;h1&gt;
  
  
  documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.updater.html#telegram.ext.Updater"&gt;https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.updater.html#telegram.ext.Updater&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;updater = Updater("API KEY",&lt;br&gt;
                  use_context=True)&lt;/p&gt;

&lt;h1&gt;
  
  
  getting the dispatcher required to handle the command /start and send message back to the user
&lt;/h1&gt;

&lt;h1&gt;
  
  
  documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.dispatcher.html#telegram.ext.Dispatcher"&gt;https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.dispatcher.html#telegram.ext.Dispatcher&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;dispatcher: Dispatcher = updater.dispatcher&lt;/p&gt;

&lt;p&gt;def start(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    the callback for handling start command&lt;br&gt;
    """&lt;br&gt;
    # getting the bot from context&lt;br&gt;
    # documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/latest/telegram.bot.html#telegram-bot"&gt;https://python-telegram-bot.readthedocs.io/en/latest/telegram.bot.html#telegram-bot&lt;/a&gt;&lt;br&gt;
    bot: Bot = context.bot&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sending message to the chat from where it has received the message
# documentation: https://python-telegram-bot.readthedocs.io/en/latest/telegram.bot.html#telegram.Bot.send_message
bot.send_message(chat_id=update.effective_chat.id,
                 text="You have just entered start command")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
  
  
  register a handler (here command handler)
&lt;/h1&gt;
&lt;h1&gt;
  
  
  documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.dispatcher.html#telegram.ext.Dispatcher.add_handler"&gt;https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.dispatcher.html#telegram.ext.Dispatcher.add_handler&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;dispatcher.add_handler(&lt;br&gt;
    # it can accept all the telegram.ext.Handler, CommandHandler inherits Handler class&lt;br&gt;
    # documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.commandhandler.html#telegram-ext-commandhandler"&gt;https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.commandhandler.html#telegram-ext-commandhandler&lt;/a&gt;&lt;br&gt;
    CommandHandler("start", start))&lt;/p&gt;
&lt;h1&gt;
  
  
  starting polling updates from Telegram
&lt;/h1&gt;
&lt;h1&gt;
  
  
  documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.updater.html#telegram.ext.Updater.start_polling"&gt;https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.updater.html#telegram.ext.Updater.start_polling&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;updater.start_polling()&lt;br&gt;
Posting HTML Message&lt;br&gt;
In this I will show how to send an HTML formatted message to the user. I will be using telegram.ParseMode.HTML parser for with send_message method.&lt;/p&gt;

&lt;p&gt;Updating just one send_message line in above code&lt;br&gt;
from telegram.ext.commandhandler import CommandHandler&lt;br&gt;
from telegram.ext.updater import Updater&lt;br&gt;
from telegram.ext.dispatcher import Dispatcher&lt;br&gt;
from telegram.update import Update&lt;br&gt;
from telegram.ext.callbackcontext import CallbackContext&lt;br&gt;
from telegram.bot import Bot&lt;br&gt;
from telegram.parsemode import ParseMode&lt;/p&gt;

&lt;p&gt;updater = Updater("API KEY",&lt;br&gt;
                  use_context=True)&lt;/p&gt;

&lt;p&gt;dispatcher: Dispatcher = updater.dispatcher&lt;/p&gt;

&lt;p&gt;def start(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    the callback for handling start command&lt;br&gt;
    """&lt;br&gt;
    bot: Bot = context.bot&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Added HTML Parser to the existing command handler
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.parsemode.html#telegram.ParseMode.HTML
bot.send_message(
    chat_id=update.effective_chat.id,
    text=
    "Hello User, You have used &amp;lt;b&amp;gt;start&amp;lt;/b&amp;gt; command. Search about developer on google, &amp;lt;a href='https://www.google.com/search?q=tbhaxor'&amp;gt;@tbhaxor&amp;lt;/a&amp;gt;",
    parse_mode=ParseMode.HTML,
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;dispatcher.add_handler(CommandHandler("start", start))&lt;/p&gt;

&lt;p&gt;updater.start_polling()&lt;br&gt;
The message user will receive will be the rendered HTML you have passed in text argument&lt;/p&gt;

&lt;p&gt;Using Keyboards to Build Menus&lt;br&gt;
In this, you will embrace the power of another tool provided by telegram, Keyboard. Telegram has two types plain keyboard and inline, the first is attached to the group or chat. The second one is attached to the message&lt;/p&gt;

&lt;p&gt;Simple Keyboard&lt;br&gt;
In this, I will be using telegram.ReplyKeyboardMarkup to add new keyboard to the chat and telegram.ReplyKeyboardRemove to remove the keyboard from the chat&lt;br&gt;
from telegram.ext.updater import Updater&lt;br&gt;
from telegram.update import Update&lt;br&gt;
from telegram.ext.callbackcontext import CallbackContext&lt;br&gt;
from telegram.ext.commandhandler import CommandHandler&lt;br&gt;
from telegram.replykeyboardmarkup import ReplyKeyboardMarkup&lt;br&gt;
from telegram.replykeyboardremove import ReplyKeyboardRemove&lt;br&gt;
from telegram.ext.messagehandler import MessageHandler&lt;br&gt;
from telegram.ext.filters import Filters&lt;/p&gt;

&lt;p&gt;updater = Updater("API KEY", use_context=True)&lt;/p&gt;

&lt;p&gt;def start(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    method to handle the /start command and create keyboard&lt;br&gt;
    """&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# defining the keyboard layout
kbd_layout = [['Option 1', 'Option 2'], ['Option 3', 'Option 4'],
                   ["Option 5"]]

# converting layout to markup
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.replykeyboardmarkup.html
kbd = ReplyKeyboardMarkup(kbd_layout)

# sending the reply so as to activate the keyboard
update.message.reply_text(text="Select Options", reply_markup=kbd)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;def remove(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    method to handle /remove command to remove the keyboard and return back to text reply&lt;br&gt;
    """&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# making a reply markup to remove keyboard
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.replykeyboardremove.html
reply_markup = ReplyKeyboardRemove()

# sending the reply so as to remove the keyboard
update.message.reply_text(text="I'm back.", reply_markup=reply_markup)
pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;def echo(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    message to handle any "Option [0-9]" Regrex.&lt;br&gt;
    """&lt;br&gt;
    # sending the reply message with the selected option&lt;br&gt;
    update.message.reply_text("You just clicked on '%s'" % update.message.text)&lt;br&gt;
    pass&lt;/p&gt;

&lt;p&gt;updater.dispatcher.add_handler(CommandHandler("start", start))&lt;br&gt;
updater.dispatcher.add_handler(CommandHandler("remove", remove))&lt;/p&gt;

&lt;h1&gt;
  
  
  adding the message handler with filter to handle the Option [0-9] regex input
&lt;/h1&gt;

&lt;h1&gt;
  
  
  documentation for MessageHandler: &lt;a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.ext.messagehandler.html"&gt;https://python-telegram-bot.readthedocs.io/en/stable/telegram.ext.messagehandler.html&lt;/a&gt;
&lt;/h1&gt;

&lt;h1&gt;
  
  
  documentation for Filter: &lt;a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.ext.filters.html#telegram.ext.filters.Filters"&gt;https://python-telegram-bot.readthedocs.io/en/stable/telegram.ext.filters.html#telegram.ext.filters.Filters&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;updater.dispatcher.add_handler(MessageHandler(Filters.regex(r"Option [0-9]"), echo))&lt;/p&gt;

&lt;p&gt;updater.start_polling()&lt;br&gt;
Inline Keyboard&lt;br&gt;
In this I will be using telegram.ext.CallbackQueryHandler which returns a telegram.CallbackQuery when user presses an telegram.InlineKeyboardButton&lt;br&gt;
from telegram import InlineKeyboardButton, InlineKeyboardMarkup&lt;br&gt;
from telegram.ext.updater import Updater&lt;br&gt;
from telegram.ext.commandhandler import CommandHandler&lt;br&gt;
from telegram.ext.callbackqueryhandler import CallbackQueryHandler&lt;br&gt;
from telegram.callbackquery import CallbackQuery&lt;br&gt;
from telegram.ext.callbackcontext import CallbackContext&lt;br&gt;
from telegram.update import Update&lt;br&gt;
from telegram.message import Message&lt;br&gt;
import sys&lt;/p&gt;

&lt;h1&gt;
  
  
  creating updater
&lt;/h1&gt;

&lt;p&gt;updater: Updater = Updater("API KEY",&lt;br&gt;
                           use_context=True)&lt;/p&gt;

&lt;p&gt;def error(update: Update, context: CallbackContext):&lt;br&gt;
    """Log Errors caused by Updates."""&lt;br&gt;
    sys.stderr.write("ERROR: '%s' caused by '%s'" % context.error, update)&lt;br&gt;
    pass&lt;/p&gt;

&lt;p&gt;def start(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    callback method handling /start command&lt;br&gt;
    """&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# creating list of input buttons
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.inlinekeyboardbutton.html
keyboard = [[
    InlineKeyboardButton("Option 1", callback_data='1'),
    InlineKeyboardButton("Option 2", callback_data='2')
], [InlineKeyboardButton("Option 3", callback_data='3')]]

# creating a reply markup of inline keyboard options
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.inlinekeyboardmarkup.html
reply_markup = InlineKeyboardMarkup(keyboard)

# sending the message to the current chat id
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.message.html#telegram.Message.reply_text
update.message.reply_text('Please choose:', reply_markup=reply_markup)
pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;def button(update, context):&lt;br&gt;
    """&lt;br&gt;
    callback method handling button press&lt;br&gt;
    """&lt;br&gt;
    # getting the callback query&lt;br&gt;
    # documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.callbackquery.html"&gt;https://python-telegram-bot.readthedocs.io/en/stable/telegram.callbackquery.html&lt;/a&gt;&lt;br&gt;
    query: CallbackQuery = update.callback_query&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# CallbackQueries need to be answered, even if no notification to the user is needed
# Some clients may have trouble otherwise. See https://core.telegram.org/bots/api#callbackquery
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.callbackquery.html#telegram.CallbackQuery.answer
query.answer()

# editing message sent by the bot
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.callbackquery.html#telegram.CallbackQuery.edit_message_text
query.edit_message_text(text="Selected option: {}".format(query.data))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
  
  
  adding listeners
&lt;/h1&gt;

&lt;p&gt;updater.dispatcher.add_handler(CommandHandler('start', start))  # handling /start command&lt;br&gt;
updater.dispatcher.add_handler(CallbackQueryHandler(button))  # handling inline buttons pressing&lt;br&gt;
updater.dispatcher.add_error_handler(error)  # error handling&lt;/p&gt;
&lt;h1&gt;
  
  
  started polling
&lt;/h1&gt;

&lt;p&gt;updater.start_polling()&lt;br&gt;
Sending Force Replies&lt;br&gt;
Upon recieving messages from user, telegram bot will display a reply interface to the user like if user has selected the bot message to reply back. This could be used in creating step-by-step user friendly interface.&lt;/p&gt;

&lt;p&gt;I will be using telegram.ForceReply to send force reply&lt;br&gt;
from telegram.forcereply import ForceReply&lt;br&gt;
from telegram.ext.filters import Filters&lt;br&gt;
from telegram.ext.updater import Updater&lt;br&gt;
from telegram.ext.messagehandler import MessageHandler&lt;br&gt;
from telegram.ext.callbackcontext import CallbackContext&lt;br&gt;
from telegram.update import Update&lt;/p&gt;

&lt;p&gt;updater = Updater("API KEY", use_context=True)&lt;/p&gt;

&lt;p&gt;def echo(update: Update, context: CallbackContext):&lt;br&gt;
    # sending the force reply to the user&lt;br&gt;
    # documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.forcereply.html"&gt;https://python-telegram-bot.readthedocs.io/en/stable/telegram.forcereply.html&lt;/a&gt;&lt;br&gt;
    update.message.reply_text(reply_markup=ForceReply(selective=True), text="Reply to this message")&lt;br&gt;
    pass&lt;/p&gt;

&lt;p&gt;updater.dispatcher.add_handler(MessageHandler(Filters.text, echo))&lt;/p&gt;

&lt;p&gt;updater.start_polling()&lt;br&gt;
Chat Action&lt;br&gt;
Now suppose you created a bot that processes some files / information that could take some time. The user might think bot is broken and close it. The telegram provides very cool option ChatActions to send user messages immediately after his/her submission.&lt;/p&gt;

&lt;p&gt;I will be using telegram.Bot.send_chat_action along with telegram.ChatAction&lt;br&gt;
from telegram.bot import Bot&lt;br&gt;
from telegram.update import Update&lt;br&gt;
from telegram.ext.updater import Updater&lt;br&gt;
from telegram.ext.callbackcontext import CallbackContext&lt;br&gt;
from telegram.ext.messagehandler import MessageHandler&lt;br&gt;
from telegram.ext.filters import Filters&lt;br&gt;
from telegram.chataction import ChatAction&lt;br&gt;
from time import sleep&lt;/p&gt;

&lt;p&gt;updater = Updater("API KEY", use_context=True)&lt;/p&gt;

&lt;p&gt;def echo(update: Update, context: CallbackContext):&lt;br&gt;
    # sending the chat action, under the name of bot it will show Typing...&lt;br&gt;
    # documentation: &lt;a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.chataction.html"&gt;https://python-telegram-bot.readthedocs.io/en/stable/telegram.chataction.html&lt;/a&gt;&lt;br&gt;
    context.bot.send_chat_action(chat_id=update.effective_chat.id, action=ChatAction.TYPING)&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# simulating some long processing
sleep(3)

# sending reply when it's done
update.message.reply_text(text="Hey ya!! You sent me '%s'" % update.message.text)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;updater.dispatcher.add_handler(MessageHandler(Filters.text, echo))&lt;/p&gt;

&lt;p&gt;updater.start_polling()&lt;br&gt;
Deep Linking&lt;br&gt;
Telegram also supports deeplinking. It helps to create a refereal system to promote your bot or products via bot.&lt;/p&gt;

&lt;p&gt;I will be using telegram.utils.helpers.create_deep_linked_url to create a deep link&lt;br&gt;
from telegram.bot import Bot&lt;br&gt;
from telegram.utils.helpers import create_deep_linked_url&lt;br&gt;
from telegram.ext.commandhandler import CommandHandler&lt;br&gt;
from telegram.ext.callbackcontext import CallbackContext&lt;br&gt;
from telegram.update import Update&lt;br&gt;
from telegram.ext.updater import Updater&lt;br&gt;
import re&lt;/p&gt;

&lt;p&gt;updater = Updater("API KEY", use_context=True)&lt;/p&gt;

&lt;p&gt;def generate(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    method to create a deep link and send it to the current user for sharing&lt;br&gt;
    """&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# generating a sharable link with the payload
# documentation: https://python-telegram-bot.readthedocs.io/en/stable/telegram.utils.helpers.html#telegram.utils.helpers.create_deep_linked_url
url = create_deep_linked_url(context.bot.get_me().username, update.message.chat.username)
update.message.reply_text(text="Share it with your friends: %s.\n Copy the link and share it with them" % url)
pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;def start(update: Update, context: CallbackContext):&lt;br&gt;
    """&lt;br&gt;
    method to run on &lt;br&gt;
    """&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# extracting the payload with /start
_ = re.findall(r"(?:/start )(.+)", update.message.text)

# checking if it exists and sending message accordingly
if len(_) &amp;gt; 0:
    update.message.reply_text(text="You have been refered by: %s" % _[0])
    pass
else:
    update.message.reply_text(text="Hello, It seems you are new to this bot")
    pass

update.message.reply_text(text="Use /generate to create your own referal")
pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;updater.dispatcher.add_handler(CommandHandler("generate", generate))&lt;br&gt;
updater.dispatcher.add_handler(CommandHandler("start", start))&lt;/p&gt;

&lt;p&gt;updater.start_polling()&lt;br&gt;
Course Outro&lt;br&gt;
Thanks for reading this course, I would encourage you to explore this wonderful telegram client yourself. I would be happy to see your creations after pursuing this tutorial. In future, if I planned to add more snippets and projects, you know where to find it. &lt;/p&gt;

</description>
      <category>pytho</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>3 Ways to restore your deleted files</title>
      <dc:creator>Divyanshu Hoon</dc:creator>
      <pubDate>Mon, 12 Feb 2024 22:39:42 +0000</pubDate>
      <link>https://forem.com/divyanshuhoon/3-ways-to-restore-your-deleted-files-107m</link>
      <guid>https://forem.com/divyanshuhoon/3-ways-to-restore-your-deleted-files-107m</guid>
      <description>&lt;p&gt;Accidentally Deleted Something?&lt;br&gt;
We're talking about accidentally deleting important files using the Shift + Delete shortcut in Windows, which removes the possibility to simply recover them from the Recycle Bin.&lt;/p&gt;

&lt;p&gt;Don't lose hope...&lt;br&gt;
Let me tell you three different ways to recover the permanently deleted files on Windows 10.&lt;/p&gt;

&lt;p&gt;Restore using CMD&lt;br&gt;
Restore using older backup&lt;br&gt;
Restore using Third Party App&lt;br&gt;
Let's start recovering data...&lt;br&gt;
GIFgif-vest&lt;br&gt;
Restore using CMD&lt;br&gt;
Step 1: Open the Start Menu.&lt;/p&gt;

&lt;p&gt;Step 2: Type cmd, right-click on the top match and select Run as administrator.&lt;/p&gt;

&lt;p&gt;Step 3: Type chkdsk X: /f and hit Enter on your keyboard. Replace X with the letter of your hard drive.&lt;/p&gt;

&lt;p&gt;Step 4: Type ATTRIB -H -R -S /S /D X:&lt;em&gt;.&lt;/em&gt; and hit Enter. Again, replace X with the letter of your hard drive.&lt;/p&gt;

&lt;p&gt;What do these parameters in ATTRIB command mean?&lt;/p&gt;

&lt;p&gt;-H: it gives the Hidden attribute to the files specified.&lt;br&gt;
-R: it refers to the read-only attribute (files can be read but cannot be changed).&lt;br&gt;
-S: it gives the System attribute to the files specified.&lt;br&gt;
/S: it tells the system to search the specified path (including subfolders).&lt;br&gt;
/D: it consists of process folders.&lt;/p&gt;

&lt;p&gt;recover-files-using-cmd-2&lt;/p&gt;

&lt;p&gt;The recovery process may take a while to finish, so be patient and don't interrupt it.&lt;/p&gt;

&lt;p&gt;Restore using older backup&lt;br&gt;
To restore files from a file backup that was created after the system image backup was created, follow these steps.&lt;/p&gt;

&lt;p&gt;Step 1: Open the Start Menu.&lt;/p&gt;

&lt;p&gt;Step 2: Search backup.&lt;/p&gt;

&lt;p&gt;Step 3: Select the Go to Backup and Restore option under Looking for an older backup?.&lt;/p&gt;

&lt;p&gt;Step 4: Click on the Select another backup to restore files from option and choose your backup.&lt;/p&gt;

&lt;p&gt;Step 5: Click Next and follow the instructions to complete the recovery process.&lt;/p&gt;

&lt;p&gt;Screenshot (104)&lt;/p&gt;

&lt;p&gt;Restore using Third Party App&lt;br&gt;
Step 1: Download and Install Disk Drill just like you would any other Windows application.&lt;/p&gt;

&lt;p&gt;Step 2: Launch Disk Drill and click the Search for lost data button next to the hard drive which you want to recover permanently deleted files.&lt;/p&gt;

&lt;p&gt;Step 3: From the list of results, select which files you want to recover.&lt;/p&gt;

&lt;p&gt;Step 4: Click the Recover button to begin the recovery process.&lt;/p&gt;

&lt;p&gt;MainScreenDiskDrill-1&lt;/p&gt;

&lt;p&gt;Do you know more methods to recover our deleted data, please comment down below 👇🏻👇🏻&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The-usage-of-artificial-intelligence-in-the-sitepoint-community/</title>
      <dc:creator>Divyanshu Hoon</dc:creator>
      <pubDate>Mon, 12 Feb 2024 22:36:38 +0000</pubDate>
      <link>https://forem.com/divyanshuhoon/the-usage-of-artificial-intelligence-in-the-sitepoint-community-4je7</link>
      <guid>https://forem.com/divyanshuhoon/the-usage-of-artificial-intelligence-in-the-sitepoint-community-4je7</guid>
      <description>&lt;p&gt;We have noticed a significant spike in the usage of ChatGPT (or some other sort of AI tool) to provide answering posts. While we’re not sure the cause of the usage (English not being the native tongue, not being an expert on the topic, etc). there’s been a definitive increased pattern in its usage.&lt;/p&gt;

&lt;p&gt;After much discussion privately, the community staff has decided that the drawbacks of using the tool at this time outweighs the benefits, and we’re going to be monitoring/removing posts which are obviously AI generated.&lt;/p&gt;

&lt;p&gt;There are a number of reasons for this approach:&lt;/p&gt;

&lt;p&gt;Since the AI cannot detect subtlety in questions asked (i.e. read between the lines an seeing what’s really being asked), the answers given, while technically correct, may not actually answer the question being given&lt;br&gt;
The AIs depend on searching just like most of us do, and as we all know, the internet, while wonderful and powerful, doesn’t always give us what we’re asking for. The answers given may be out of date, erroneous, or incomplete.&lt;br&gt;
As we all know, the AI responses SEEM really well written. This allows people to develop perceptions of “expertise” which may not be deserved. While that may seem harmless, answers which are given more credence due to this false sense of expertise may cause someone else’s valid (and more correct) guidance to be ignored because there might be a typo or a struggle because they’re not as strong at the English language.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to improve Logic in Programming?</title>
      <dc:creator>Divyanshu Hoon</dc:creator>
      <pubDate>Mon, 12 Feb 2024 22:32:04 +0000</pubDate>
      <link>https://forem.com/divyanshuhoon/how-to-improve-logic-in-programming-4ko4</link>
      <guid>https://forem.com/divyanshuhoon/how-to-improve-logic-in-programming-4ko4</guid>
      <description>&lt;p&gt;Your logics ain't working?&lt;br&gt;
You can't deny the fact that logic is the fundamental key to become a good programmer. You might be getting frustrated when you don't get logics in programming or your logics aren't working. Don't worry...&lt;/p&gt;

&lt;p&gt;How to get better at programming logic?&lt;br&gt;
Until and unless your brain won't do a lot of practice, it's impossible to get the logic in programming.&lt;/p&gt;

&lt;p&gt;Here are 5 steps by which you can improve your logic in programming...&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Solve new problems everyday
Once you solve a specific problem don't repeat it for more than three to four times.
Your brain has to prepare itself for the new challenge to reduce the response time and get the logic in programming.
Get exposure to real-life problems and it will help you to write code for new challenging situations.
These are some popular websites on which you can practice coding:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;LeetCode&lt;br&gt;
HackerRank&lt;br&gt;
HackerEarth&lt;br&gt;
freeCodeCamp&lt;br&gt;
GeeksforGeeks&lt;br&gt;
CodeChef&lt;br&gt;
W3Schools&lt;br&gt;
Exercism&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Learn about Data Structures and Algorithms
Data structures and algorithms (DSA) goes through solutions to standard problems in detail and gives you an insight into how efficient it is to use each one of them.
Developers also have to make the right decisions when it comes to solving the real world complex problems.&lt;/li&gt;
&lt;li&gt;Moving on Level by Level
Practice enough for a variety of questions at the easy level, then move to some intermediate program.
Again move to the next level or more complex problem and solve a lot of problems.
There are different practice websites with different levels of problem sets, make sure to practice through that and improve your programming logic.&lt;/li&gt;
&lt;li&gt;Divide problems in smaller chunks
First, try to understand the complete problem and find out what exactly needs to be done.
Think about the problem carefully and write down on paper what steps you need to take in order to solve a specific problem.
Think about all the case scenarios, steps, input or variables that you need to take in order to solve it.
Take your time to write a proper algorithm and then start coding the problem set.&lt;/li&gt;
&lt;li&gt;Check other people's code
Check code written by other developers on Stackoverflow, GitHub, and learn from it.
You eventually need to think over it and use your brain or logic to solve a problem and get the correct solution.
It also helps you to find out the easier solution or various methods for the same problem.&lt;/li&gt;
&lt;li&gt;Make Projects
Working on some real-life projects gives you more exposure and experience to become better at programming.
Make calculators, eCommerce projects, personal portfolio or anything that you love to build.
When you build a project, you go through a lot of difficulties and you debug a lot of problems that help in building the logic in programming.
Last but not the least don't lose motivation. Facing problems when using logic in programming should not affect the determination of programmers but instead motivate them to push harder, thus learning more and acquiring enhanced skills.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hope this article helped you and gave you some insight on logic building.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Google Summer of Code with GNOME Foundation.</title>
      <dc:creator>Divyanshu Hoon</dc:creator>
      <pubDate>Mon, 12 Feb 2024 22:29:29 +0000</pubDate>
      <link>https://forem.com/divyanshuhoon/google-summer-of-code-with-gnome-foundation-2k30</link>
      <guid>https://forem.com/divyanshuhoon/google-summer-of-code-with-gnome-foundation-2k30</guid>
      <description>&lt;p&gt;Google Summer of Code - every undergrad's dream to get selected in. I found out about Google Summer of Code in my freshman year, I was so excited that a program like this exists where open source contributors collaborate over projects with various organizations!&lt;/p&gt;

&lt;p&gt;At first, Google announces the program in mid February, then after a month organizations are announced. Applicants start applying to various organizations and make proposals for the project they like. And in May, the results are announced and the period lasts for around three months.&lt;/p&gt;

&lt;p&gt;Learn more about Google Summer of Code here.&lt;/p&gt;

&lt;p&gt;When should I apply?&lt;br&gt;
Google announces organizations around February. Look at the detailed timeline here. There's no right time to start contributing to Open Source and getting selected in Google Summer of Code. You can start right now, contact admins and work on your issues. This will increase your chances for the next term!&lt;/p&gt;

&lt;p&gt;Tip: Look for projects from idea lists of organizations which didn't get selected for GSoC this year. Contact mentors and start individually contributing towards it. This will boost your chances, whenever you decide to apply :)&lt;/p&gt;

&lt;p&gt;I will share my experience below on how I got started with Google Summer of Code and made into it.&lt;/p&gt;

&lt;p&gt;Finding an organization&lt;br&gt;
You should first ask yourself, what are my skills? What am I proficient with? Is the community supportive? Do I have any experience in this field? Do I know at least 50% of the skills mentioned by the organization? Rest can be learnt while contributing towards project.&lt;/p&gt;

&lt;p&gt;I started looking for past selected organizations in February, found an organization named Metacall, which made polyglot programming easy. I made some contributions there. I looked into their past projects and tried to understand how the code base worked. The tech stack was mainly Python, C++, Rust, Nodejs, Docker. I knew very little about these.&lt;/p&gt;

&lt;p&gt;I am intermediate in web dev, so alongside that, I also started looking for organizations which had web dev projects. Basically GSoC allows you to make a maximum of three proposals, out of which only one gets selected. I would suggest you to do your research first. I recommend you to choose only one organization and start contributing towards it.&lt;/p&gt;

&lt;p&gt;How did I get to know about GNOME?&lt;br&gt;
Since I used Ubuntu distro of Linux, it had GNOME Desktop. I was impressed that even the organization which made the UI for Ubuntu is Open Source. I researched about them and found out that they participate in Google Summer of Code and Outreachy internship programs.&lt;/p&gt;

&lt;p&gt;In March, the selected organizations were announced publicly, I browsed through different organizations and their web dev related projects and I landed on GNOME Foundation's idea list page. As I was going through the different project ideas, the idea of Faces of GNOME - Continuing the Development of the Platform caught my eye.&lt;/p&gt;

&lt;p&gt;Selecting and working on project&lt;br&gt;
The Faces of GNOME is a Foundation-led initiative with the intent of championing the contributors and recognizing their continuous and previous efforts towards the GNOME project. Faces aim to be a historical platform where you're able to see the faces behind the GNOME project. From current contributors to past contributors. Faces intend to be a place where Contributors have their own profile, serving as a directory of the current and past Contributors of the Project.&lt;/p&gt;

&lt;p&gt;The project used Jekyll, HTML, CSS, JavaScript as its tech stack. I had no idea about Jekyll when I started this project. Had worked with Hugo, which is a similar static site generator.&lt;/p&gt;

&lt;p&gt;I started studying and experimenting with Jekyll as I had no idea about that static site generator. Took a week to study Jekyll and codebase and then jumped onto ongoing issues. My mentors, Claudio Wunder and Caroline Henriksen were supportive and helped me clear all my doubts (even silly ones)!.&lt;/p&gt;

&lt;p&gt;After getting familiar with the codebase, I started making contributions by adding features, creating wikis, suggesting ideas, etc. Check out all of my contributions here.&lt;/p&gt;

&lt;p&gt;Contribution and Proposal drafting period&lt;br&gt;
Next, in April, we had to submit our proposal. I had proposed a few new features which was really appreciated by my mentor. Creating a project proposal was a difficult task as I had to cover every bit of project feature in detail. I talked with my mentor about how I approached each topic, which helped me understand what they expected of me as well. This is a crucial issue since I was interpreting some features differently while, in reality, they were designed to accomplish something else. This tiny misunderstanding could lead you to make a poor proposal.&lt;/p&gt;

&lt;p&gt;Previous year's GSoC mentee, Arijit Kundu, helped me with drafting my proposal. I got my proposal reviewed from different foundation members who were overlooking the project. Received a nice feedback from everyone. Finally, I created my proposal utilizing the template provided by the organization.&lt;/p&gt;

&lt;p&gt;One of the most significant judging criteria is timeframe, therefore take care when selecting or drafting it.&lt;/p&gt;

&lt;p&gt;Even after making proposal, my contributions didn't stop and I started engaging with the community more. I asked doubts, joined different channels and talked about various features I wanted to implement in this project.&lt;/p&gt;

&lt;p&gt;Result Day!&lt;br&gt;
Finally, the result day came and I was happy to get selected in Google Summer of Code'23 under GNOME Foundation. I never imagined that I would be a part of this program. Open Source truly does wonders!&lt;/p&gt;

&lt;p&gt;GSoC Acceptance&lt;/p&gt;

&lt;p&gt;So, this was my experience of getting selected into Google Summer of Code. Hope you got any insights on it. If you have any questions, please connect with me on different social media platforms. I'd be happy to help you :)&lt;/p&gt;

&lt;p&gt;Happy Summers!🌞&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
