<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shehab Magdy on Medium]]></title>
        <description><![CDATA[Stories by Shehab Magdy on Medium]]></description>
        <link>https://medium.com/@shehab2003magdy?source=rss-57931a7170c5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1nbaKraBCOvg-Sz_huwjpw.jpeg</url>
            <title>Stories by Shehab Magdy on Medium</title>
            <link>https://medium.com/@shehab2003magdy?source=rss-57931a7170c5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 05:08:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shehab2003magdy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to use your PC Terminal from your Phone]]></title>
            <link>https://medium.com/@shehab2003magdy/how-to-setup-ssh-client-with-tailscale-and-termius-e277e76abf57?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e277e76abf57</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 17:56:02 GMT</pubDate>
            <atom:updated>2026-10-21T12:26:17.156Z</atom:updated>
            <content:encoded><![CDATA[<p>Control Your Coding Agents From Your Phone, Anywhere</p><p>What if you could leave your laptop at home running a coding agent, walk away, and still control it from your phone?</p><p>In this article, we’ll set up exactly that.</p><h3>What we are building</h3><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*2NxRsV0E0BtJGvlq" /></figure><p><strong>SH (Secure Shell)</strong> is a protocol that allows you to securely access and control a remote computer or server through a command-line interface. Once connected, you can execute commands, run programs, inspect logs, manage files, and essentially interact with the remote machine as if you were using its terminal directly.</p><p>For the SSH client on our phone, we’ll use <a href="https://termius.com/index.html"><strong>Termius</strong></a></p><p>To connect our devices without exposing the SSH server directly to the public internet, we’ll use <strong>Tailscale</strong>. Tailscale creates a private network between our devices, allowing them to communicate securely from different locations.</p><p>Finally, we need an <strong>SSH server</strong> running on the computer we want to control. We’ll use <strong>OpenSSH</strong> for this.</p><p>The resulting setup looks like this:</p><p>Phone → Termius → Tailscale → OpenSSH → Your Computer</p><p>Once everything is configured, your phone essentially becomes a remote terminal for your computer.</p><h3>Applications</h3><p>This setup can be useful for much more than simply accessing a terminal remotely. For example:</p><ul><li>Control AI coding agents (we will do this one)</li><li>Remote development: access your development environment when you’re away from your computer.</li><li>Monitor ML Training: check running experiments, GPU usage, logs, and processes.</li><li>Manage a home server</li><li>and more..</li></ul><p>The possibilities are essentially limited by what you can do from a terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rbspakCnpdIeI7QhWzadaA.jpeg" /></figure><h3>Steps</h3><ol><li>Install and configure Tailscale</li><li>Setup OpenSSH Server</li><li>Connect using Termius</li><li>Run and control your coding agent</li></ol><h4>1. Set Up Tailscale</h4><p>First, we need to make sure our phone and computer can communicate with each other regardless of where they are.</p><ol><li>Install Tailscale on your PC.</li><li>Sign in with your Google/GitHub/Microsoft account.</li><li>Leave it running.</li><li>Install Tailscale on your phone (found in app store and google play)</li><li>Sign in with the same account.</li><li>Enable the VPN when prompted.</li><li>Open Tailscale and verify your PC appears in the device list.</li></ol><p>At this point, your phone can privately reach your PC from anywhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*XrT1jItAvOkmYq0UuQtvzw.png" /></figure><p>You should see your connected devices along with their Tailscale IP addresses.</p><p>The important part here is the <strong>Tailscale IP address of your computer</strong>. We’ll use it later when configuring Termius. Think of this as the private address your phone will use to reach your computer.</p><h4>2. Set Up the SSH Server</h4><p>Tailscale gives our devices a private network, but we still need something on the computer that can accept SSH connections. That’s where <strong>OpenSSH Server</strong> comes in.</p><p>On Windows, OpenSSH Server can be installed as an optional feature. After installing it, start the SSH service and configure it to start automatically with Windows.</p><p>Open <strong>PowerShell as Administrator</strong> and check whether it is installed:</p><pre>Get-WindowsCapability -Online | Where-Object Name -like &#39;OpenSSH.Server*&#39;</pre><p>If the result shows: State : NotPresent</p><p>install it with:</p><pre>Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0</pre><p>Windows will download and install the OpenSSH Server feature. Depending on your internet connection, it may take a few minutes.</p><p>After installation, verify that the feature is installed:</p><pre>Get-WindowsCapability -Online | Where-Object Name -like &#39;OpenSSH.Server*&#39;</pre><p>You should see: State : Installed</p><p>Now start the SSH server:</p><pre>Start-Service sshd</pre><p>Configure it to start automatically whenever Windows starts:</p><pre>Set-Service -Name sshd -StartupType Automatic</pre><p>Finally, verify that the service is running:</p><pre>Get-Service sshd</pre><p>You should see something similar to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*19q-uA5yYCvHp1fLS7SvmQ.png" /></figure><p>At this point, your PC is capable of accepting SSH connections.</p><p>Next Find your PC’s Tailscale IP address</p><p>Now we need the address that our phone will use to reach the PC through Tailscale.</p><p>Connect Using Your Windows Account. SSH will use your existing Windows account to authenticate the connection.</p><p>You’ll need:</p><ul><li><strong>Username:</strong> your Windows username</li><li><strong>Password:</strong> your Windows/Microsoft account password</li></ul><blockquote><strong>Note:</strong> Your Windows Hello PIN is not the same as your account password. When connecting through SSH, use your actual microsoft account password.</blockquote><p>You can find your Windows username by running:</p><pre>whoami</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*V21ye0IAAVNoe-VhvInCZA.png" /></figure><p>Open PowerShell and run:</p><pre>ssh &lt;your-windows-username&gt;@localhost</pre><p>for example ssh shehab@localhost</p><p>The first time you connect, Windows may ask you to confirm the server’s host key:</p><pre>Are you sure you want to continue connecting (yes/no/[fingerprint])?</pre><p>Type: yes</p><p>You will then be prompted for your password:</p><pre>Shehab@localhost&#39;s password:</pre><p>Enter your <strong>Windows/Microsoft account password</strong>.</p><blockquote><strong>Important:</strong> This is your account password, not your Windows Hello PIN.</blockquote><p>If authentication succeeds, you’ll get a terminal session on your Windows machine. This confirms that OpenSSH Server is working correctly.</p><p>Later, when we configure Termius, we’ll use the <strong>same username and password</strong> together with the PC’s Tailscale IP.</p><p>Run this command using PowerShell:</p><pre>tailscale ip -4</pre><p>This will return your machine’s Tailscale IPv4 address, which will typically look like: 100.x.x.x</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*CDu3ZcyciGtE-SIzzlPyCw.png" /></figure><p>Write down and save the Tailscale IP shown.</p><h4>3. Connect From Your Phone Using Termius</h4><p>Now we can configure the SSH client on our phone.</p><ol><li>Install Termius on your Phone (found on App store &amp; Google Play)</li><li>Choose the free plan</li><li>Create a new <strong>Host</strong>.</li><li>Fill in Host with the Tailscale IP saved before (100.108.18.12 in my case)</li><li>Fill in Username (the one we get from running the command whoami , in my case its shehab</li><li>Fill in Port to 22 Default</li><li>Fill in Password (your actual Microsoft account password that is linked to windows)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*C5q5UQA2XGArN0besx5WSg.png" /></figure><p>Once you created the host you can tap on it and you may be asked to enter the password (your Microsoft password) again. then the terminal will open like this image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*yHZB78X8TAPPjgxwTbhvkw.png" /></figure><h4>4. Run Your Coding Agent</h4><p>Now we get to the interesting part. .At this point, you are able to do anything you usually do with a terminal. Looking to our example we will be running a coding agent from the terminal.</p><p>Suppose your coding agent is installed on your computer. You can navigate to your project: cd ~/projects/my-projectand start the agent. The important thing to understand is that <strong>the coding agent is still running on your computer</strong>. Your phone is simply providing the interface to control it.</p><p>This means your phone doesn’t need the processing power required to run the agent. The computation happens on your computer while you interact with it remotely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b-cbMPQHjnXu4gKe3IYTsA.png" /></figure><p>With <strong>Tailscale</strong>, <strong>OpenSSH</strong>, and <strong>Termius</strong>, you can turn your phone into a secure remote terminal for your computer.</p><p>Your laptop can stay at home doing the heavy work while you access it remotely from almost anywhere.</p><p>By the way, this setup can also be a great way to avoid paying for additional remote-agent services. Many new AI coding tools offer remote computer control as part of their paid plans or with limited free usage. For example, Codex provides a free tier with usage limits that reset periodically.</p><p>Instead of paying for another service, you can run an AI agent directly on your own computer and access it remotely through this setup. As long as the agent itself has a free or locally available option, you can use your existing machine’s computing resources while controlling it from your phone.</p><p>In other words, you can build your own lightweight remote AI development environment using tools you may already have , without adding another monthly subscription.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e277e76abf57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Future of Death and Artificial Intelligence]]></title>
            <link>https://medium.com/@shehab2003magdy/the-future-of-death-and-artificial-intelligence-fc4bab79fa91?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc4bab79fa91</guid>
            <category><![CDATA[death]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[future]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 17:03:48 GMT</pubDate>
            <atom:updated>2026-07-04T22:09:19.239Z</atom:updated>
            <content:encoded><![CDATA[<p>Predictions on How AI will Reshape the Concept of Death</p><p>Death has always been humanity’s one unavoidable certainty agree on. Across history, people have searched for ways to delay it, escape it, or leave something behind after it arrives</p><p>Kings built monuments. Ancient civilizations preserved bodies. Billionaires now invest fortunes into longevity research, hoping to extend life by decades. Yet despite every technological breakthrough, one fact has remained unchanged: every human being dies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*doRcveBAGEZt9whBGnpeKw.png" /></figure><p>This article explores one possible future. It is not a prediction of what should happen, nor a statement that it will happen. It is simply an attempt to imagine how AI may fundamentally change our relationship with death.</p><p>Death is inevitable. That’s is the one certainty that all humans and religions have agreed on, For centuries, people have searched for ways to postpone it or leave a lasting mark after they are gone. Wealthy individuals have invested fortunes in the hope of extending life, yet none have achieved immortality.</p><p>Others pursued a different kind of existing. Civilizations built statues, wrote books, and preserved bodies. The ancient Egyptians, for example, developed mummification to keep the physical body intact for thousands of years. Yet despite these remarkable efforts, the people themselves are gone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wAmAFe4oSebLJ_Pq" /><figcaption>Photo by <a href="https://unsplash.com/@el_chicho?utm_source=medium&amp;utm_medium=referral">Narciso Arellano</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Artificial intelligence introduces a different possibility.</p><h3>What if the future is not about preserving the body, but preserving the mind?</h3><p>Well I have a creepy possible prediction of AI &amp; Death. Unlike statues or mummies, AI has the potential to preserve how a person thinks , their humor, communication style, decision-making patterns, memories, and personality traits. It may never preserve consciousness or soul itself, but it could preserve something that resembles it.</p><p>While humans are an amazing complex, and I do not believe AI will ever become identical to a human being. However, it is impossible to ignore how rapidly AI continues to evolve. With each generation of models, we see significant improvements in reasoning, pattern recognition, and the ability to imitate human behavior.</p><p>Now, consider the following thought experiment.</p><p>Earlier, we discussed how some people are willing to spend unimaginable amounts of money in pursuit of a longer life. Imagine that, in the future, the wealthy have access to a different kind of “anti-death” technology.</p><p>A child is born, and shortly after birth, the family visits a specialized facility. There, the child receives a tiny device designed to record not only conversations, but every interaction, decision, preference, habit, and significant event. From the day the child is born until the day they die, the device continuously collects data that reflects how that person thinks and behaves.</p><p>The idea may sound far-fetched, but parts of it are already technically reasonable, According to Gordon Bell and Jim Gray from Microsoft Research, storing every conversation a person has ever had would require less than a terabyte of storage. The speech or text recognition technologies are one of the biggest challenges of the concept. The greater challenge is not storage, but accurately capturing, understanding, and interpreting those conversations through speech and language technologies. I add to that, As our lives become increasingly digital, Even that challenge becomes less daunting. Emails, text messages, social media interactions, voice notes, search history, and countless other digital footprints already document a significant portion of our daily lives.</p><p>Another major source of data is our online behavior. The analysis of internet and social media activity is nothing new; companies and researchers have been studying digital behavior for years to understand people’s interests, preferences, and decision-making patterns. Now, imagine extending that analysis over an entire lifetime. Decades of online activity could reveal not only an individual’s personality, but also the evolution of a society’s culture, values, ways of thinking, and collective interests. This huge data is utilized to create an AI system that mimics the behavior of the dead person.</p><h3><strong>Digital Immortality</strong></h3><p>This idea aligns with the concept of <strong>Digital Immortality</strong>. Researcher <em>Susanne Asche</em> offers the following definition:</p><blockquote><em>As a hopefully minimalistic definition then, digital immortality can be roughly considered as involving a person-centric repository containing a copy of everything that a person sees, hears, says, or engenders over his or her lifespan, including photographs, videos, audio recordings, movies, television shows, music albums/CDs, newspapers, documents, diaries and journals, interviews, meetings, love letters, notes, papers, art pieces, and so on, and so on</em></blockquote><p>In other words, digital immortality is not built from a single AI model. It is built from a lifetime of data, A comprehensive digital record that captures not only what a person did, but also how they communicated, what they valued, and how they interacted with the world.</p><p>When that person eventually dies, the data collected throughout their lifetime does not disappear. Instead, it becomes the foundation of an AI system embodied through an interface — perhaps a chatbot, a humanoid robot, or another form of intelligent device, not as the traditional Ouija board. its the phone in your hand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8opxDOP9SM8eNPTb" /><figcaption>Photo by <a href="https://unsplash.com/@coltonsturgeon?utm_source=medium&amp;utm_medium=referral">Colton Sturgeon</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It speaks with the person’s voice. It recalls their memories. It understands their humor, their habits, and the things they once loved. To their children, it may still feel like a father. To their siblings, a brother. To their friends, someone who never truly left.</p><p><a href="https://digital-immortality.org/">Digital immortality</a> involves creating a digital replica of your personality, memories, and voice using AI. By feeding your personal narratives and data such as chats, daily interaction, emails, and life stories, into advanced machine learning models, companies can build chatbots or avatars that allow future generations to interact with you after you’re gone.</p><p>Digital replicas may one day prove especially valuable for preserving the knowledge and experience of influential individuals, scientists, educators, innovators, and leaders whose wisdom could continue to benefit future generations.</p><blockquote><em>Digital ‘immortality’ is coming and we’re not ready for it</em></blockquote><blockquote>James Trew</blockquote><p>I realize this prediction, as dark as it may seem, raises many unanswered technical, philosophical, and ethical questions. There are countless flaws and assumptions in this thought experiment. Still, given the pace of AI development, I believe some form of this technology may emerge much sooner than many of us expect.</p><p>This idea closely resembles the premise of the <em>Black Mirror</em> episode <strong>“Be Right Back.”</strong> In the story, a woman loses her husband and turns to a company that creates a highly realistic replica of him using his digital footprint. The result is a humanoid robot that looks and behaves almost exactly like the man she lost.</p><p>Yet despite its remarkable resemblance, she never truly accepts it as her husband. The machine feels incomplete — almost soulless. It imitates his appearance, voice, and behavior, but it lacks the authenticity that made him who he was.</p><p>When the episode first aired, the concept felt like distant science fiction. Today, however, with the rapid advancement of artificial intelligence, increasingly capable language models, and the growing amount of personal data we generate throughout our lives, the idea no longer seems quite so impossible. While we are still far from creating a true digital replacement for a human being, the foundations of such technology are already beginning to emerge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRClPnV-6m84FsTFUFfqKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*RbBo-kQekY-LQZT0Ry6DdA.png" /></figure><blockquote>the advancement of Artificial Intelligence (AI) is ushering humanity into a realm where the boundary between the living and the deceased is becoming increasingly blurred <br>Boston University’s Magazine</blockquote><p>I would like to emphasize that this article is not an endorsement of digital immortality or a statement of my personal beliefs. It is simply a thought experiment , An exploration of one possible future shaped by the rapid advancement of artificial intelligence.</p><p>Lastly, This topic inevitably touches on religious, philosophical, and ethical questions, but my intention here is neither to argue for nor against the idea. Instead, I hope this article encourages discussion about how AI might reshape one of humanity’s oldest and most fundamental concepts: death. as a goat to raising awareness and mitigate unwanted consequences.</p><p>What do you think ?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc4bab79fa91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create Your Own Knowledge Base with Obsidian]]></title>
            <link>https://medium.com/@shehab2003magdy/how-to-create-your-own-knowledge-base-with-obsidian-cc16e2e206f5?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc16e2e206f5</guid>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <category><![CDATA[obsidian]]></category>
            <category><![CDATA[knowledge-management]]></category>
            <category><![CDATA[knowledge-base]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Fri, 21 Nov 2025 16:16:47 GMT</pubDate>
            <atom:updated>2025-11-22T13:33:24.772Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let’s Build a Second Brain!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*GZ-464v7NG5gAON3wVPgYQ.png" /><figcaption>My Knowledge Base Graph</figcaption></figure><p>It’s been three years since I began building my own Knowledge Base. But can someone truly <em>create</em> a Knowledge Base? In reality, we all already have one — we just don’t consciously think about it. We naturally <strong>think with it</strong>, relying on what we know in our daily lives, in our work, and in almost everything we do.</p><p>Human is so good at learning and creating internal knowledge, but the problem is that this knowledge is volatile if not accessed or used in a periodic manner.</p><h3>But, What if we have the ability to save this knowledge?</h3><p>My goal in this article is to show you how you can create and interact with your knowledge so that you can track everything you learn and being able to get back to the information anytime you want.</p><h3>Why Saving you knowledge is important and how it helped me personally?</h3><p>as a CS major student, i was stormed by tons of information from the very first day of joining the field and till this moment i am in a continuous learning, as the knowledge increase and become more interacted, i thought that I need to write down the information i know to track and save it for later purposes such as projects or a topic that is built on another topic, first I tried writing down in a notebook (a paper and pen approach), it worked for a few weeks but the problem that it will be very hard to track and find an information in hundreds of notebooks and papers. So i thought about writing notes digitally on computer and i found this approach very efficient regarding searching time, space, and ease of access.</p><h3>How to Create the Knowledge Base?</h3><p>To accomplish the digital notes taking, I needed an application that fulfill my purpose. there is plenty but the one i recommend personally and i will be using in this article is <strong>Obsidian</strong></p><p>Obsidian is a Knowledge management tool that allows you to take notes as a markdown files, it also allows you to add attachments like images and voice notes! It’s open sourced allowing almost daily cool user plugins that makes you customize everything in the app.</p><p>join the subreddit of obsidian for tips and advices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NgTuHiPzg_MvcRVc.png" /></figure><p>What makes Obsidian so special for me is how it connects the knowledge represented in the markdown files. in Obsidian you can create a note that is connected to another note with a <strong>backlink</strong>, Obsidian also allow you to Visualize all the notes connected together in a Graph that represents your whole knowledge allowing you to take a wider look on how you think and gain insights.</p><p>Below is a snapshot of my 2 years CS knowledge Base and it&#39;s growing daily and exponentially. I have the ability to access and read a note that i wrote 2 years ago easily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*tDhc2vz11pJbMFeKedaqMA.png" /></figure><h4>Do you think this is cool? Look at the Graphs found online by Obsidian users</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9qgPPWFYuZc-V-Rj.png" /><figcaption><a href="https://forum.obsidian.md/t/multiple-graph-view-filters-and-color-grouping-for-each/39076">https://forum.obsidian.md/t/multiple-graph-view-filters-and-color-grouping-for-each/39076</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*PrKuFEppR09kPjom.png" /><figcaption><a href="https://mstdn.social/@catsynth/111987321261076156">https://mstdn.social/@catsynth/111987321261076156</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*x9E3fbmwuABzlePg.gif" /><figcaption><a href="https://github.com/geoffreysflaminglasersword/obsidian-living-graph">https://github.com/geoffreysflaminglasersword/obsidian-living-graph</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*cbIv-8Meycz3TQSgXKxoWg.png" /><figcaption><a href="https://www.reddit.com/r/ObsidianMD/comments/1otcelc/my_obsidian_graph_after_3_years/">https://www.reddit.com/r/ObsidianMD/comments/1otcelc/my_obsidian_graph_after_3_years/</a></figcaption></figure><h3>What should you add in the Knowledge Base?</h3><p>This is an important question to ask yourself before starting, but from my experience you should first divide your knowledge based on the field of study. for example, if you are into CS and History. then you shall create two separate Obsidian Vaults, one of CS and one for History, keep in mind that each vault can be completely different from other vaults, you can customize each vault appearance and plugins as you like.</p><p>Secondly create subfields of the higher field. in my case a CS knowledge Base may have subfields like</p><ul><li>Mathematics</li><li>Programming</li><li>Theory of Computation</li><li>Systems and Architecture</li><li>Software Engineering</li><li>Frameworks and Tools</li><li>Data Science <em>(my major)</em></li><li>Embedded and IoT</li><li>… <em>add more or less as you learn</em></li></ul><p>Third is the type of information added. how you write your files is very important in managing the Knowledge, You Must draft each file content to be as atomic as possible. for example if you are to write about “Data Structures”, you never create one file called data structure and keep adding into it to be thouthands of informations and words that’s a bad approach and will it harder to manage. But what you should do is distribute the Data Structures topic into finer Topics or information, like Array, Linked-List, Tree, etc.</p><blockquote>The golden advice is to make every topic as fine and atomic as possible</blockquote><p>If you struggle to find the atomic topic or node (or file), I wrote about buzzwords stroming, buzzwords represents the main nodes or the main words in a field. knowing how to extract these words is a essential skill to have to be able to create your knowledge base, you can refer to the article later <a href="https://medium.com/@shehab2003magdy/learn-anything-faster-with-buzzword-storming-90842ecde199">here</a></p><p>Don’t add things randomly, keeping your knowledge base clean is a high priority goal. <strong>Take your time </strong>creating you knowledge base and try to make it organized and stick to <strong>high quality content </strong>with reliable sources. a topic can get shaped from 5 different sources that’s totally fine and desirable. thus don’t be afraid to edit a file after you found a better content, that continuous edit will eventually converge to a high quality Knowledge Base that represents your brain and thoughts. And remember, an unorganized Knowledge Base will lead to a distracted mind. and on contrary an organized one will lead to a brilliant creative mind that can see the whole picture.</p><p>Initially an information is an orphan or alone, by the time it will connect to another information to create a family of nodes that represents a cluster in the Graph</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*VSL3n19EIWuUSUL96kypOA.png" /><figcaption>Clusters of Information</figcaption></figure><p>Hierarchy nature of folders and files will help you easily distribute and imagine files relations. and that’s bring us to the next advice, the Folders naming and hierarchy.</p><p>We saw earlier and example of how CS subfields may look like, organizing your folders will boost your Knowledge management, I will share how i organize my folder and you can get an intuition on how to do yours</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*x67THQs5v91OCBGCe49JKQ.png" /></figure><p>These are the main Subfolders under my CS vault, that doesn’t imply that your folder shall look the same but to follow the idea.</p><p>As you can see, folders represents the high level subfields, with indexing for organization, but there are essential folders that I recommend adding to your Knowledge Base, first 00_Hub (index), very useful for navigation when your files increase massively. basically, it have the files that tells you where you can find a specific file or folder. secondly 10_Miscellaneous which holds all the files that you need but you can’t figure out where it should be added, it’s like a temporary storage for the unclassified content. Another use case of it that it holds assets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*oFkOn6JuzmKExynb6W3TfA.png" /></figure><p>In markdown, when you add an image (or any attachment) it’s added in the main working folder that is looks annoying and unorganized, and you can’t delete it simply because that will corrupt the image in your file. so you have to have a place that holds that attachments which is assetsfolder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*paozilxa6z01jGBYIAKZUw.png" /></figure><p>in the image above i created a file called cats and added an image of my beautiful cat, you will notice that a PNG file was created in the main vault. thus you need to add it manually to your folder 10_Miscellaneous/assets</p><p>But that is really annoying if you will have to do that for every single attachment. of course i didn’t forget that my friend. so you need to write a simple script that automate moving any attachment to the wanted folder.</p><pre># Define source and destination directories<br>source_dir = &quot;Obsidian Vault&quot;<br>destination_dir = r&quot;CS Knowledge Base\10_Miscellaneous\assets&quot;<br><br># Allowed image extensions (add as you go)<br>image_extensions = {&#39;.png&#39;,&#39;.svg&#39;, &#39;.jpg&#39;, &#39;.jpeg&#39;, &#39;.gif&#39;, &#39;.bmp&#39;, &#39;.webp&#39;}<br><br># Create destination directory if it doesn&#39;t exist<br>os.makedirs(destination_dir, exist_ok=True)<br><br># Loop through files in the source directory<br>for filename in os.listdir(source_dir):<br>    # Get full file path and extension<br>    file_path = os.path.join(source_dir, filename)<br>    _, ext = os.path.splitext(filename)<br><br>    # Check if it&#39;s an image file<br>    if ext.lower() in image_extensions and os.path.isfile(file_path):<br>        # Move the file<br>        shutil.move(file_path, os.path.join(destination_dir, filename))<br>        print(f&quot;Moved: {filename}&quot;)</pre><p>so every time you need to clean your folder from attachments scattered just run the above code, But will you run this manually daily? nah, that is not so good engineering, so we need Automation ✨</p><p>for this, Check Out my article on how to <a href="https://medium.com/@shehab2003magdy/automate-running-your-python-scripts-with-windows-task-scheduler-671bb3e9f628">automate running your python scripts with Windows Task Scheduler</a></p><p>This automation will run the above script on a periodic manner you define like daily or weekly. making your working project clean and let you focus on the Knowledge itself</p><h3><strong>Wrap Up</strong></h3><h4>The 5 Golden Advices for a good Knowledge Base:</h4><ol><li>Divide your knowledge vaults based on the field of study. <em>(CS Vault, History Vault,.etc).</em></li><li>Recursively create subfields of the higher fields (e,g.CS/Mathematics/Calculus).</li><li>Draft each file content to be as atomic as possible.</li><li>Create a helper folder like Miscellaneous and index to increase organization and management.</li><li>Take your time making your Knowledge Base, stick to a high quality content and keep editing as you learn.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9mC5NTuDIr5vhvEk" /><figcaption>Photo by <a href="https://unsplash.com/@growtika?utm_source=medium&amp;utm_medium=referral">Growtika</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>At the end of the article I want to thank you for reaching this part and thanks to all contributors of Obsidian who made this idea alive.</p><p>Next article, we will talk about how to chat with your notes using LLMs! Stay Tuned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc16e2e206f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learn Anything Faster with Buzzword Storming]]></title>
            <link>https://medium.com/@shehab2003magdy/learn-anything-faster-with-buzzword-storming-90842ecde199?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/90842ecde199</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[creative-writing]]></category>
            <category><![CDATA[skills]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Mon, 29 Sep 2025 12:33:59 GMT</pubDate>
            <atom:updated>2025-09-29T12:33:59.504Z</atom:updated>
            <content:encoded><![CDATA[<p>My favorite learning technique for mastering new skills quickly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*peU0nIRT-n3-mvNJ4OkDmQ.png" /><figcaption>A Word Cloud for famous Buzzwords in Data Science &amp; AI</figcaption></figure><p>Most of us rarely dedicated time to discovering our best learning technique. I believe that learning methods are very versatile — they differ from a person to another and even from one field of study to another. A technique that works perfectly for someone might feel completely ineffective for someone else, and that’s perfectly normal. Finding your ideal method takes time, but once you truly understand yourself and know what you want, you will be Super!</p><p>The world is moving faster than ever. Getting a job now requires more skills than before, and acquiring more skills demands more dedicated learning time to acquire that skill. So in my opinion the most valuable skill in our time is to be a fast learner.</p><blockquote>I find it strange that ads are personalized because we know everyone is different, but education is not — Chip Huyen</blockquote><p>Our brain is incredible, and no—I won’t repeat the popular nonsense about “how to use 100% of your brain.” The truth is, if you’re not using 100% of your brain, that’s actually a medical condition! Every healthy human being constantly uses their entire brain constantly. However, the right is question is “How to use that 100% of your brain in the right way?”.</p><p>The human brain is exceptional at connecting ideas in a meaningful way. When it’s fails to do so, we experience what we call “Confusion”. So without further ado, in this article I’ll share a powerful technique that helps your brain connect new information quickly enabling you always see and realize the bigger picture thus will make you a fast learner. And makes you gain more skills. And so thriving in today’s world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NUVWaZeq1wsm87Y23tq7w.png" /></figure><p>I like to call this technique <strong>“Buzzwords Storming.”</strong> So, what is it exactly? It’s simple: start by listing words from your field of interest that people outside of it might not easily understand. These words are often referred to as <em>buzzwords</em> or <em>jargon.</em></p><p>Buzzwords are crucial for understanding and communicating within your field. The more buzzwords you know, the more you expand your knowledge base. Simply learning the buzzword is often enough — your brain will naturally start making the connections. Over time, this vocabulary helps you link concepts more effectively, sparking new ideas and unlocking new skills.</p><h3>Approach</h3><p>We start by collecting as many buzzwords as possible and storing them in one place — this becomes our personal <em>Knowledge Base.</em> But how do we collect these buzzwords systematically? Normally, you’ll encounter buzzwords naturally while studying or working in your field, and that’s helpful, but it’s often slow and unorganized. In this approach, however, we add a layer of scientific organization that helps you:</p><ul><li>Track what you actually learn.</li><li>See your progress clearly.</li><li>Transform raw knowledge into actionable achievements.</li></ul><h4>The Approach is simply represented into two main operations:</h4><ul><li><strong>Buzzword Collection:</strong> Actively gather new buzzwords from books, lectures, articles, or conversations in your field. The goal is quantity — capture as many as possible without worrying too much about details at first. Just know the basic knowledge about the term.</li><li><strong>Documentation: </strong>Store these buzzwords in an organized way, creating your own knowledge base. By documenting them, you’ll be able to track what you’ve learned, revisit concepts easily, and steadily turn scattered knowledge into structured understanding.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2lHmWYgSrDdr_0tZ5vvlw.png" /></figure><h4>Buzzword Collection</h4><p>I’ll share the method I personally use — you can follow it as is or adapt it to your own preferences. For this step, I rely on Large Language Models (LLMs) such as ChatGPT or Gemini, since they are especially powerful and organized when it comes to this task.</p><p>Here’s the main prompt I use:</p><blockquote>“Give me a list of buzzwords in <strong>{Field Name}</strong>. For each buzzword, provide a short, simple definition. Don’t go too deep — just keep it concise and easy to understand.”</blockquote><p>Practicing this regularly — in your free time, during commutes, or while waiting — can make a huge difference. Over time, you’ll find yourself speaking confidently about your topics of interest, understanding them more deeply, and even being able to explain them clearly to others.</p><h4>Documentation</h4><p>I’ll be honest — documentation is not a strict requirement, but it’s definitely a “nice-to-have.” In this approach, however, documentation becomes the key to remembering and tracking your knowledge. Since organization is essential, documentation is necessary if you want to reach the next level.</p><p>By creating your own Knowledge Base (KB), you open up more opportunities: you can revisit what you’ve learned, share it with others, and build upon it to create even greater value.</p><p>Documentation is represented in saving the buzzwords and connecting them physically and mentally, For that, you’ll need a note-organization tool that can actually create and visualize these connections. Here’s a screenshot from my personal Computer Science Knowledge Base, which I’ve been building for over three years (and it’s still growing!). It’s like a map of how I think — and honestly, that’s pretty cool.</p><p>For this, I use <strong>Obsidian</strong>: a powerful tool with a customizable interface that makes knowledge organization and visualization seamless. It’s one of the best tools I’ve found to supercharge this approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9vf35cBpGGvqCIR2PkprHg.png" /><figcaption>A snippet from my obsidian KB</figcaption></figure><p>Soon, I’ll be publishing another article where I explain exactly how I built my own Computer Science Knowledge Base using Obsidian.</p><p>In the meantime, i’d love to hear from you —how did you find the <strong>Buzzword Storming</strong> approach after trying it out? Feel free to reach out if you’d like guidance or want to share your experience.</p><p>Thanks for reading, and have a good one!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90842ecde199" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate Running Your Python Scripts with Windows Task Scheduler]]></title>
            <link>https://medium.com/@shehab2003magdy/automate-running-your-python-scripts-with-windows-task-scheduler-671bb3e9f628?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/671bb3e9f628</guid>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Tue, 29 Apr 2025 01:02:42 GMT</pubDate>
            <atom:updated>2025-04-29T01:13:14.523Z</atom:updated>
            <content:encoded><![CDATA[<p>A Step-by-Step Guide to Automating Python Scripts with Windows Task Scheduler</p><p>Automation is essential in today’s technology-driven world. Applying it to your tasks and projects can significantly boost your efficiency and productivity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2xRc59e2BM0oqYq5fUTk2A.png" /><figcaption>Thumbnail</figcaption></figure><h3>Scenario</h3><p>Imagine you’re working on a project locally on your PC, with all your files saved in a directory. As you make continuous and critical changes to your project, version control becomes essential. It helps you track updates, manage different versions, and easily identify bugs whenever they arise.</p><p>Popular version control platforms like GitLab and GitHub allow you to upload your project files to the cloud, track changes over time, and easily revert or switch to specific versions of your project files.</p><p>This was the exact problem I faced while working on my CS Knowledge Base project. Let me give you a quick overview to set the context.</p><p>As a Computer Science student, I wanted a structured method to track the knowledge and information I was gaining throughout my college years — and beyond. I started searching for tools that could help me save notes in a smarter and more organized way. After some research, I discovered Obsidian — a powerful and intelligent note-taking app that was exactly what I was looking for.</p><p>Every day as I study, I add between 10 to 20 new notes (technically, Markdown files) while also editing, deleting, or combining existing ones. In short, there were constant updates to my project files.</p><p>Naturally, I needed a reliable way to back up these files — because they represent how I think and connect knowledge.</p><p>You can easily relate this situation to any project or codebase that you work on manually and update on a regular basis</p><p>I decided to save the files in a GitHub repository. However, every day, I had to manually run a Python script to push the updated files to the repo.</p><p>Doing this manually every single day quickly became repetitive— and honestly, quite boring.</p><p>Wouldn’t it be great if there were a solution to automate this process, so you could focus on your actual work and boost your creativity?</p><p>This is where <strong>Task Scheduler</strong> comes in!</p><h3>Test Python Script</h3><p>To make this idea clearer, let’s imagine you’re working at a company where you’re required to create a text file every day. It might sound like a simple task, but it sets the stage for understanding the process.</p><p>To test whether our Task Scheduler setup is working properly, we need a Python script with an obvious output. I’ll provide a simple script that creates a text file on your Desktop each time it runs. The name of the file will include the current date and time.</p><p>Feel free to copy and paste the following code into a file named create_txt_file.py, then run it before continuing with the tutorial to make sure you&#39;re on the right track.</p><pre>import os<br>from datetime import datetime<br><br># Get current datetime and format it for filename (no special characters like &#39;:&#39; that are illegal in filenames)<br>now = datetime.now()<br>filename = now.strftime(&quot;%Y-%m-%d_%H-%M-%S&quot;) + &quot;.txt&quot;<br><br># Get desktop path<br>desktop = os.path.join(os.path.expanduser(&quot;~&quot;), &quot;Desktop&quot;)<br><br># Full path for the file<br>file_path = os.path.join(desktop, filename)<br><br># Create and write to the file<br>with open(file_path, &#39;w&#39;) as file:<br>    file.write(&quot;This file was created on &quot; + now.strftime(&quot;%Y-%m-%d %H:%M:%S&quot;))<br><br>print(f&quot;File created: {file_path}&quot;)</pre><h3>Task Scheduler</h3><p>Task Scheduler is a built-in tool on Windows systems that automates the execution of tasks whenever they’re triggered. While its user interface isn’t very friendly, don’t worry — I’ll guide you through the process!</p><ul><li>Search for “<strong>Task Scheduler</strong>” in the search bar in your taskbar</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*CJdlni4Ky2iIf3UtHPjLzg.png" /><figcaption>Task Scheduler Logo</figcaption></figure><ul><li>Your application interface should look like this:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BAQxQ1tbAiZ1XdZyD_DpSQ.png" /><figcaption>UI of Task Scheduler</figcaption></figure><ul><li>Hover on “<strong>Action</strong>” and click on “<strong>Create Task</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*MrF4_oQbwda2s4ip6N-ttA.png" /></figure><ul><li>Or you can find it directly on your right hand</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5UyIg2LZtpRsJkyz1qJeQ.png" /></figure><ul><li>Add a Name for your task and choose “<strong>Run only when user is logged on</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*jtmC2zwIZRRfayDMc9O9Tw.png" /></figure><ul><li>Navigate to “<strong>Triggers</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*j05MD0BWmUbg-eXOcy8TYg.png" /><figcaption>Navigate to “<strong>Triggers</strong>”</figcaption></figure><ul><li>Click “<strong>New</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*F_mjVLGK9O9Siduffa7xiA.png" /><figcaption>Click “New”</figcaption></figure><p>Here, you can define when your task should run in the future. You have several scheduling options to choose from, such as:</p><ul><li>One time</li><li>Daily</li><li>Weekly</li><li>Monthly</li></ul><p>Set the start date and the time you want the task to run according to your preference.</p><p>There are additional settings you can customize as you explore further, but for simplicity, we won’t cover them in this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*Jt4dNwS2aMFLhdauQ0ePYA.png" /><figcaption>State the task running time</figcaption></figure><ul><li>Go to “<strong>Actions</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*vOEo2TADgrfQ_qQIN0x34w.png" /><figcaption>Go to Actions</figcaption></figure><ul><li>click “<strong>New</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*PNtSLSz4WTacG2w1C8RTKQ.png" /></figure><p>At this stage, you’ll notice that there are several task options, some of which are deprecated and no longer actively used.</p><p>However, the option we need is <strong>‘Start a program’</strong>, which allows us to run our Python script automatically</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*UnjMNpgECqw7418TVVGJyg.png" /></figure><p>Next, we need to specify the <strong>‘Program/script’</strong> — and it’s important to note that this is <strong>not</strong> the path to your Python file, as some might assume. Instead, it should be the path to the Python interpreter installed on your PC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*QrPU8Ia5xULVSY9qxy9sjw.png" /></figure><h4>How to Find the Correct Python Interpreter on Your Machine?</h4><ul><li>open CMD or Command Prompt</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*a-50hqHIgLlxQB_aK-rqEg.png" /><figcaption>Search on CMD in the Search bar</figcaption></figure><ul><li>type the following command and press Enter:</li></ul><pre>where python</pre><p>You’ll see one or more paths ending with python.exe — this is the actual program that runs your Python scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*hAhC6kgVnK5bmpwdZShYew.png" /><figcaption>output</figcaption></figure><p>As you can see in my case, I have two Python installations.</p><h4>But which one actually runs my Python scripts by default on my PC?</h4><ul><li>Create a file.py and run the next code:</li></ul><pre>import sys<br><br>print(sys.executable)</pre><ul><li>The output is likely to match one of the two paths you found earlier using the where python command.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WkBsFVFMZsGeN26KXF_Olw.png" /><figcaption>Output (the first path in our last output)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWY-DpZTotMcytLUKbcwww.png" /></figure><ul><li>Copy the path of the correct python.exe interpreter.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*XiOqL7vnuHBlu0-6SmiyVg.png" /></figure><ul><li>paste the path in “<strong>Program/script</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*xEzcfO79QKd12kAk8dJvgw.png" /></figure><ul><li>Now, navigate to the location where you saved your create_txt_file.py script.</li><li>Hover over its icon, then press <strong>Shift + Right Click</strong>, and select <strong>&#39;Copy as path&#39;</strong> from the menu.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*BTiUKDX6eNXP59zPiaWkrg.png" /></figure><ul><li>Go back to Task Scheduler. In the <strong>‘Add arguments’</strong> field, paste the full filename of your Python script, including the .py extension. In the <strong>&#39;Start in&#39;</strong> field, paste the path to the directory where your Python file is located.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*25KTE1gbADzCln9ZvGwDvg.png" /></figure><h4>Example</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1eo3WfCRhcTZ8cm8Lc_hKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*eKiYQD47d80wlleeXorOyQ.png" /></figure><ul><li>Finally, hit the <strong>‘OK’</strong> button — and you’re done! 🎉</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYrwtSrKuUul5rsgSSDDiw.png" /><figcaption>New Task Created</figcaption></figure><p>To test it, click on the task you just created, then click the <strong>‘Run’</strong> button on the right-hand side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UX2VRhZ1UC78k3fwlndAsw.png" /></figure><p>This will force the task to run immediately. Otherwise, it will automatically run at the date and time you previously set— as long as your PC is on and operating at that time.</p><p>When the task runs, you might notice a Command Prompt (CMD) window briefly popping up and closing — this is completely normal; it just means your task is running successfully ;)</p><h3>How Far Can We Go With This Idea? 🚀</h3><p>Now that your PC can automatically run any program when triggered — how far can you take this?</p><p>I will give you some examples and amazing use cases for this Auto Task Scheduling:</p><ul><li><strong>Web Scraping</strong><br> Want to scrape news, stock prices, or website data on a daily basis? Automating this with Task Scheduler and Python will make your setup sharp, efficient, and super cool! <em>(Stay tuned for a future project on this!)</em></li><li><strong>Version Control Automation</strong><br> Working on a large project where version control is essential?<br> Tools like GitLab and GitHub help you track changes and manage mistakes. If your PC can automatically push project updates on a regular schedule, you can focus entirely on coding and innovation — without worrying about manual backups!</li><li><strong>Database Backups</strong><br> Set up scripts that automatically back up your local databases (like SQLite, MySQL, or PostgreSQL) at night, so you always have the latest safe copy without manual effort.</li><li><strong>Report Generation</strong><br> Imagine automatically running a script that pulls data, analyzes it, and generates daily or weekly reports for work or personal projects. No more forgetting or rushing deadlines!</li><li><strong>Email Notifications</strong><br> You could automate Python scripts that send email reminders, daily summaries, or alerts based on certain conditions (e.g., stock prices crossing a threshold).</li><li><strong>System Cleanup</strong><br> Automate scripts that clear cache folders, delete old temp files, or organize your Downloads folder periodically — keeping your PC clean without lifting a finger.</li><li><strong>IoT Device Monitoring</strong><br> If you’re working on IoT projects, you could set a script to monitor sensor data and alert you (or take action) if something unusual happens — all without manual checking.</li></ul><blockquote>Creativity Has No Limits</blockquote><p>Automation isn’t just about saving time — it’s about unlocking your creativity and allowing you to focus on what truly matters.<br> With simple tools like Windows Task Scheduler and a few lines of Python, you can <strong>build smarter workflows</strong>, <strong>reduce repetitive work</strong>, and <strong>turn ideas into reality faster than ever before.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z7sjvecTATFZnWy0" /><figcaption>Photo by <a href="https://unsplash.com/@joannakosinska?utm_source=medium&amp;utm_medium=referral">Joanna Kosinska</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you found this guide helpful, <strong>stay tuned</strong> — I’ll be sharing even more automation tricks, Python projects, and more!</p><p>Don’t forget to <strong>follow</strong> for the next project drop — and feel free to leave a comment or share your automation ideas below. Let’s keep building and automating together!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=671bb3e9f628" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChatGPT for Students: Mastering AI for Academic Success]]></title>
            <link>https://medium.com/@shehab2003magdy/chatgpt-for-students-mastering-ai-for-academic-success-60f60464bcbb?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/60f60464bcbb</guid>
            <category><![CDATA[study]]></category>
            <category><![CDATA[teaching]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[students]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 16:31:42 GMT</pubDate>
            <atom:updated>2024-10-14T16:31:42.103Z</atom:updated>
            <content:encoded><![CDATA[<h4>Tips and Strategies for Students using ChatGPT that will boost their academic performance</h4><p>ChatGPT is an AI language model. designed to understand and generate human-like text based on prompts. Students can leverage ChatGPT as a powerful tool for learning, research, and problem-solving, making it the best companion for Their Academic journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a0ZFjAxYpq84ehSz" /><figcaption>Photo by Jigar Panchal on Unsplash</figcaption></figure><p>I wrote this article to show you how to use ChatGPT effectively and harness its benefits without losing your academic learning. Many students are misusing ChatGPT, relying on it to complete their assignments or answer online assessments without putting in any real effort. They throw in simple, weak prompts and let ChatGPT do all the work.</p><p>This approach results in little to no real learning (except maybe faster typing — just being sarcastic). ChatGPT, like other AI tools, is a double-edged sword.</p><p>In this article, I’ll share my experience and guide you on how to maximize ChatGPT’s benefits, highlighting not only what to do — but also <strong>what not to do </strong><em>(a part often not mentioned)</em> — to ensure you use it in a way that enhances your academic growth.</p><p>Don’t worry if you’ve used ChatGPT improperly in the past, as I mentioned earlier. You’re here now to fix that, and that’s what truly matters.</p><blockquote>the first step in solving a problem is recognizing there is one</blockquote><h4>Practical Tips: What to Do with ChatGPT</h4><ol><li><strong>Translation</strong>: Say goodbye to Google Translate! ChatGPT can serve as your primary translator, as it translate providing context-aware translations that students need. Beside that it support many languages. You can still use Google Translate to hear the pronunciation of words, which can enhance your language proficiency.</li><li><strong>Paraphrasing and Text Refining:</strong> You can provide any text you’d like to refine or paraphrase and ChatGPT will adjust it according to the context. However, There are other AI tools that are dedicated to this part like <a href="https://www.grammarly.com/">Grammarly </a>and <a href="https://quillbot.com/">Quillbot</a>. You can also specify the desired format and tone of the generated text, whether you want it to sound professional, casual, or something in between. I’ve also written an article covering this specific topic, which I highly recommend reading after finishing this article.</li><li><strong>Lectures Summarizing and image illustration</strong>: ChatGPT excels at summarizing content, making it a valuable tool for summarizing lectures, papers, and articles. Additionally, it can illustrate images, which can help you understand visuals like diagrams or figures that may be unclear. While these features typically require a membership, ChatGPT allows you to upload a limited number of files each day. You can leverage this capability to enhance your understanding of the context and visualize concepts more effectively.</li><li><strong>Self-Assessment and MCQ generation:<br></strong> This is one of the best uses of ChatGPT. You can leverage ChatGPT to generate multiple-choice questions (MCQs) that test your knowledge and understanding. For example, I provided a .PDF file of the Lecture and asked ChatGPT to generate MCQs to test myself which helped deepen my understanding of the topic .Additionally, you can ask ChatGPT to clarify why a particular answer is correct and explain why other options are not.</li><li><strong>Researching and References</strong>: AI can be an excellent tool for conducting professional research or writing academic papers. However, I’m not referring to AI-generated content — <strong>don’t rely on AI to write your research for you</strong>. Instead, focus on how AI can help you discover relevant books, papers, and articles that you can find online. <br>AI can act as a <strong>smart search engine</strong>, offering context along with the references and sources behind its generated content. For integrity and professionalism, ignore the generated content and focus on the sources it provides. Tools like <a href="https://www.perplexity.ai/"><strong>Perplexity</strong> </a>are particularly useful for this purpose.<br>For example, if you’re researching <strong>World War II</strong>, you can input a search prompt related to your topic. The AI will return a list of relevant sources, which you can then use for deeper, more accurate research.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DfcMhPkfWtk_1Lj-tYovFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3tPQ8Ilg6JmiDCQoQmqcCg.png" /></figure><p>As you can see, it provides sources, images, and videos, along with the option to engage in a follow-up conversation, similar to chatting. In my opinion, this is one of the best AI tools available for students and researchers.</p><p>6.<strong> Consulting and Brainstorming:</strong> ChatGPT can be a valuable resource for consulting and brainstorming ideas. It can help you craft a tailored study plan for a specific topic and create a roadmap to guide your success in a particular field. Additionally, ChatGPT can suggest tools to enhance your academic career, improve time management, and much more!. You just need to craft an effective prompt to guide the conversation. I’ve written an article on this topic, which you can find <a href="https://medium.com/@shehab2003magdy/unlocking-the-full-power-of-ai-by-mastering-effective-prompting-67b861c56b03">here</a>.</p><p>7. <strong>Confidence in Speaking Languages: </strong>Absolutely! ChatGPT can help you enhance your English speaking skills. Proficiency in languages like English is essential for both academic success and career opportunities. Many people excel in written English but struggle with speaking it.</p><p>Engaging in spoken conversations with ChatGPT can help you overcome the fear of speaking and improve your fluency. The mobile application of ChatGPT features a voice chat function that is intuitive and human-like, making it an excellent tool for practicing spoken language skills.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*YVolEEFtapL4O3RSnQMNDg.png" /></figure><h4>Practical Tips: What Not to Do with ChatGPT</h4><ol><li><strong>Full Reliance on ChatGPT for Writing:</strong> While ChatGPT excels at generating text, you shouldn’t rely on it entirely to craft your work. you can’t cancel your role as the writer — your thoughts, ideas, and words are what truly convey the message. Start by writing as much as you can from <strong>your own perspective</strong>, shaping your ideas <strong>in your own voice</strong>. After that, refine your work yourself as much as possible before turning to ChatGPT for the final touch and enhancement.</li></ol><blockquote><strong>Remember, AI should help free up your time for you to focus on bigger goals— not take over the important work while leaving you to handle the smaller, time-consuming ones.</strong></blockquote><p>2. <strong>Coding Assistance (For CS Students)</strong>: Coding with ChatGPT can be incredibly helpful — if you provide the right prompt. However, if you ask ChatGPT to generate or fix a code for a topic you are still learning, or for more complex tasks like backend API integration, simply copying and pasting the code can lead to errors. Debugging such code may take hours , if not days. Why ? Because you may not fully understand what you’ve copied.</p><p>The better approach is to first search for solutions on reliable coding platforms. for example,<strong> </strong><a href="https://stackoverflow.com/"><strong>Stack Overflow</strong></a> is a popular site where developers share solutions, and its community is highly supportive. search there for the technical problem facing you. You can also seek help from specialized communities based on the technology you’re working with. If you’re integrating <strong>Firebase</strong>, for example, start by checking Firebase’s official documentation or their community forums. Discord servers dedicated to coding topics are also excellent resources, where experienced users can offer quick help.</p><p>In parallel, you can use ChatGPT to generate code, but make sure your prompt is clear. Compare the code ChatGPT provides with what you find on the internet. Take the time to understand both versions and how they work so that you can debug and modify them easily. If there’s a part you don’t fully understand, you can always ask ChatGPT to explain the code or specific snippets.</p><h4><strong>What to Do If You Can’t Find the Code Online?</strong></h4><p>After extensive searching, if you still can’t find the code you need or if the solutions you’ve found aren’t solving the problem, don’t panic. A good approach in this situation is to consult multiple large language models (LLMs), like <strong>Claude</strong> in addition to ChatGPT. By providing both models with the same prompt, you’ll get two different sets of code focused on solving the same problem. A great tool for working with multiple AI models is <a href="https://www.notdiamond.ai/">NotDiamond</a> .This tool saves time by displaying the content from both AI models on a single screen.</p><p>As I mentioned before, it’s crucial to ask the model to explain the code using it. <strong>Copying and Pasting is not recommended</strong> <strong>At all</strong>, especially when you’re creating it for the first time. Instead, a method I personally follow is splitting my screen between the IDE (or code editor) and the code generated by the model. This allows you to carefully write and understand the code piece by piece, minimizing errors and ensuring you fully understand how it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1EIT5tW8_j-7CkVxj_zEQ.png" /><figcaption>example of splitting the screen</figcaption></figure><p>This approach will help you gain a deeper understanding of the code’s functionality, enabling you to confidently debug and modify it as needed. However, it’s essential to stay focused while typing the code. Remember, this process is <strong>iterative </strong>— you’ll likely engage in an extended conversation with ChatGPT, refining the code step by step until you get it working properly.</p><p>The code worked, and the problem is solved! Since the code was difficult to find and implement, it’s a good idea to preserve your hard work by uploading it to a <strong>GitHub repository</strong>. Make sure the code is well-formatted and properly commented. Document your learning journey — explain the challenges you faced and how you overcame them. Detailing these steps in your own words not only proves that you fully understand the code and can recreate it on your own, but it also helps others grasp the problem and offers valuable support to your peers.</p><p>here is a visualized plan of the operation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSUMXxwycvxb5rq2ymt-2A.png" /></figure><h3>Bonus Tip: Version Control and Career Boost</h3><p>Uploading your code to GitHub is not just a way to showcase your achievement — it’s essential for <strong>version control</strong>. By doing so, you can easily track changes, revert to previous versions if errors occur, and modify the program without losing your original work. Additionally, this practice will enhance your GitHub profile, increasing your contributions and visibility. A strong GitHub presence can boost your career prospects and potentially help you land a job in the future.</p><p>3. <strong>Important Career Decisions: </strong>While ChatGPT can seem human-like in its responses, it’s crucial to remember that <strong>ChatGPT is not a human</strong> and can make mistakes. You should never fully rely on AI for life-changing decisions, such as shifting your career path or leaving school. AI models like ChatGPT can sometimes provide inaccurate or misleading information — this is called “hallucination.”</p><p>While it’s fine to consult ChatGPT for ideas or brainstorming, don’t take its suggestions as the final word. Always seek advice from experienced people you trust, ask for multiple opinions, and connect with others before making any significant life or career decisions.</p><p>In conclusion, I want to thank everyone who contributed to the creation of this article. As a student, I understand the challenges that others face, and I genuinely wanted to help. I can make mistakes and I welcome your feedback, friends. I hope this article has helped you enhance your academic performance. Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60f60464bcbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connecting ESP32 to HiveMQ for Real-time IoT Data Streaming with MQTT]]></title>
            <link>https://medium.com/engineering-iot/connecting-esp32-to-hivemq-for-real-time-iot-data-streaming-with-mqtt-8813f48cb1a4?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/8813f48cb1a4</guid>
            <category><![CDATA[mqtt]]></category>
            <category><![CDATA[hivemq]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Fri, 16 Aug 2024 12:58:15 GMT</pubDate>
            <atom:updated>2025-03-02T13:08:01.302Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Step-by-Step Guide to Stream IR Sensor Data to the cloud</h4><p>Before proceeding with the tutorial, make sure you have set up the ESP32 on your device. If you haven’t done so yet, please follow the Medium article I’ve written about setting up ESP32 with PlatformIO and Visual Studio Code. You can find the article <a href="https://medium.com/@shehab2003magdy/getting-started-with-esp32-and-platformio-a-step-by-step-guide-5713e16f3c4b">here</a>.</p><p>In the world of IoT, there comes a point where you need to collect and stream data generated by sensors, uploading it to the internet for storage, analysis, or other operations. As you may know, the ESP32 and microcontroller boards in general don’t have the capacity to store large amounts of sensor data. To overcome this limitation, we leverage the advantages of cloud services, which offer storage solutions over the internet without the need for additional hardware.</p><p>But how can we upload our data to the cloud or stream it online? What protocol is used to transmit and receive data over the network specifically for IOT? The answer is <strong>MQTT</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*F9vuGJOH_T5DRECr.png" /><figcaption>MQTT logo</figcaption></figure><p>MQTT (Message Queuing Telemetry Transport) is a <strong>lightweight</strong>, <strong>publish-subscribe</strong>, machine-to-machine network protocol used for message queuing services. It is specifically designed for connections with remote locations where devices may have resource constraints or limited network bandwidth, such as in the Internet of Things (IoT).</p><p>MQTT runs over a transport protocol that provides ordered, lossless, bi-directional connections — typically <strong>TCP/IP</strong>.</p><p>Now let’s jump to our explanatory example. we will be transmitting the IR sensor readings using MQTT</p><p>As we know, MQTT operates using a publish-subscribe architecture. Think of it like a <strong>YouTube channel</strong> you’re subscribed to. Once the channel uploads a new video, you receive a notification because you previously subscribed to that channel.</p><p>Using the same logic, let’s think of the ESP32 as the YouTube channel that “publishes” its IR sensor readings. We, as clients, want to “subscribe” to that topic to receive the readings as <strong>messages</strong>.</p><p>When dealing with numerous sensors and a variety of data and topics, the publish-subscribe methodology needs to be organized to ensure that clients subscribing to a particular topic receive only the messages from that specific topic, not others. This is where the term “<strong>Broker</strong>” comes in.</p><p>The <strong>MQTT Broker</strong> plays a crucial role in maintaining consistency, reliability, and compatibility across different devices and platforms that use MQTT for messaging and data exchange. It ensures that each client receives the appropriate messages based on their subscriptions.</p><p>The MQTT broker is primarily presented as a <strong>cloud service</strong> offered by various tech companies. Some popular examples of MQTT brokers include <strong>HiveMQ</strong>, <strong>Mosquitto</strong>, and <strong>EMQX</strong>.</p><p>However, we will be using <strong>HiveMQ </strong>in our example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*kM0zagUqaFSjLTlZzzZf2Q.png" /></figure><p>Here is the diagram representing the exact flow of work and data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eN-0hT9G_rviLuevyGlGsg.png" /></figure><p>The ESP32 will be publishing the IR sensor readings in a live stream of data to the MQTT broker.</p><p>The client, which is the laptop (or PC) we are using, will subscribe to the topic that contains the IR sensor readings.</p><p><strong>Note:</strong> The sensor readings (data) that are sent or received are referred to as messages or payloads. The Topic is the content that the client subscribes to and is usually written in a hierarchical format, such as esp32/sensor/IR_sensor. This hierarchy helps organize and manage different types of data.</p><p>Now, let’s connect our hardware components. I will be using an IR sensor to stream its readings. Follow the connection diagram below:</p><ul><li>VCC =&gt; 3V3</li><li>GND =&gt; GND</li><li>DAT =&gt; GPIO pin</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/0*WpHni5RvWuM7GwYg.png" /><figcaption>IR sensor diagram connection with ESP32</figcaption></figure><p>Note that the IR sensor can also come in this shape:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_-ohVf3_3QNO98teNlKqdg.jpeg" /><figcaption>IR sensor</figcaption></figure><p><strong>Now that we have connected the IR sensor to the ESP32, make sure that:</strong></p><ol><li>The ESP32 is connected to your PC or laptop using a USB cable<strong>.</strong> If you are unsure how to do this, please refer to this <a href="https://medium.com/@shehab2003magdy/getting-started-with-esp32-and-platformio-a-step-by-step-guide-5713e16f3c4b">article</a></li><li>Ensure a reliable WiFi network so that ESP32 can Connect to it.</li><li>Make sure to connect the IR sensor’s “OUT” (“DAT”) pin to one of the following pins on the ESP32: {36, 39, 34, 35, 32, or 33}. These are the only pins that support analog reading when the ESP32 is connected to WiFi</li></ol><p><strong>Next, follow these instructions step-by-step to setup the MQTT broker:</strong></p><p><strong>1</strong>. Go to HiveMQ website: <a href="https://www.hivemq.com/">https://www.hivemq.com</a></p><p><strong>3</strong>. click on “Start Free” in the up right corner</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzwDrBweSvAftD33SOFFgQ.png" /></figure><p><strong>3</strong>. scroll down an click on “HiveMQ cloud”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rkg-nuw0PFALKur8YAMGtQ.png" /></figure><p><strong>4</strong>. Sign Up or login with Google</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*NM004z7OjqTvEV7qajP9nA.jpeg" /></figure><p><strong>5</strong>. This should be your screen after logging in. I have already created a cluster, but don’t worry — I’ll guide you through creating a new one.</p><p>If you’re wondering what a <strong>cluster </strong>is, it refers to a group of HiveMQ broker instances that work together to handle MQTT messages and manage MQTT connections</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*edDZoAOjTs_3gQBrEZREwA.png" /></figure><p><strong>6</strong>. click on “Create New Cluster”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5qAEBjQV2yP4GIjjOxwBQ.png" /></figure><p><strong>7</strong>. click on “Create Serverless Cluster”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8QjmRAT49qzVC5xygG-4cQ.png" /></figure><p><strong>8</strong>. your cluster will be created instantly, now click on “Manage Cluster”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWKLoqtRWB16iggkOTO5kQ.png" /></figure><p><strong>9</strong>. your screen should look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KhFfGxaetcTRdC1ViC1AMA.png" /></figure><p><strong>10</strong>. click on “ACCESS MANAGEMENT”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZEOqR3tVwjHr7k08p3-GWw.png" /></figure><p><strong>11</strong>. Create your access credentials and save the password in your notes, as we will be using it later. Set the permission to “Publish and Subscribe,” and then click on “CREATE CREDENTIAL.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IarUxqT2rbBAHfYEO2RSLg.png" /></figure><p>once created you will be able to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8wN4FMVlqHdz567huAxi-A.png" /></figure><p><strong>12</strong>. now open PlatformIO on Visual Studio Code and go to your main.cpp file and paste the following code:</p><pre>#include &lt;Arduino.h&gt;<br>#include &lt;WiFi.h&gt;<br>#include &lt;WiFiClientSecure.h&gt;<br>#include &lt;PubSubClient.h&gt;<br><br>// Wi-Fi credentials<br>const char* ssid = &quot;XXXX&quot;;<br>const char* password = &quot;XXXXXX&quot;;<br><br>// MQTT broker details private<br>const char* mqtt_broker = &quot;XXXXXXXXX&quot;;<br>const int mqtt_port = 8883;<br>const char* mqtt_username = &quot;XXXX&quot;;<br>const char* mqtt_password = &quot;XXXXX&quot;;<br><br>// MQTT topic for IR sensor<br>const char* topic_publish_ir = &quot;esp32/ir_sensor&quot;;<br><br>// IR Sensor details<br>const int ir_sensor_pin = 34; // GPIO pin connected to the IR sensor<br><br>// Create instances<br>WiFiClientSecure wifiClient;<br>PubSubClient mqttClient(wifiClient);<br><br>// Variables for timing<br>long previous_time = 0;<br><br>void setupMQTT() {<br>  mqttClient.setServer(mqtt_broker, mqtt_port);<br>}<br><br>void reconnect() {<br>  Serial.println(&quot;Connecting to MQTT Broker...&quot;);<br>  while (!mqttClient.connected()) {<br>    Serial.println(&quot;Reconnecting to MQTT Broker...&quot;);<br>    String clientId = &quot;ESP32Client-&quot;;<br>    clientId += String(random(0xffff), HEX);<br>    <br>    if (mqttClient.connect(clientId.c_str(), mqtt_username, mqtt_password)) {<br>      Serial.println(&quot;Connected to MQTT Broker.&quot;);<br>    } else {<br>      Serial.print(&quot;Failed, rc=&quot;);<br>      Serial.print(mqttClient.state());<br>      Serial.println(&quot; try again in 5 seconds&quot;);<br>      delay(5000);<br>    }<br>  }<br>}<br><br>void setup() {<br>  Serial.begin(115200);<br>  <br>  WiFi.begin(ssid, password);<br>  while (WiFi.status() != WL_CONNECTED) {<br>    delay(500);<br>    Serial.print(&quot;.&quot;);<br>  }<br>  Serial.println(&quot;&quot;);<br>  Serial.println(&quot;Connected to Wi-Fi&quot;);<br><br>  // Initialize secure WiFiClient<br>  wifiClient.setInsecure(); // Use this only for testing, it allows connecting without a root certificate<br>  <br>  setupMQTT();<br><br>  pinMode(ir_sensor_pin, INPUT); // Set IR sensor pin as input<br>}<br><br>void loop() {<br>  if (!mqttClient.connected()) {<br>    reconnect();<br>  }<br>  mqttClient.loop();<br><br>  long now = millis();<br>  if (now - previous_time &gt; 1000) { // Publish every 10 seconds<br>    previous_time = now;<br><br>    // Read the IR sensor value<br>    int ir_sensor_value = analogRead(ir_sensor_pin);<br>    int distance = map(ir_sensor_value, 0, 4095, 0, 30);<br>    <br>    // Convert the value to a string<br>    String ir_value_str = String(distance);<br>    <br>    // Publish the sensor value to the MQTT topic<br>    Serial.print(&quot;IR Sensor Value: &quot;);<br>    Serial.println(ir_value_str);<br>    mqttClient.publish(topic_publish_ir, ir_value_str.c_str());<br>  }<br>}</pre><p><strong>13</strong>. install the PubSubClient.h library</p><ul><li>on Visual Studio Code having platformIO go to this icon:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*oywVAs6DFV_esKZOAIJOxQ.png" /><figcaption>sidebar on Visual Studio Code</figcaption></figure><ul><li>click on “Libraries”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*9q3W6VTwPGyo9-92l8Uzyw.png" /></figure><ul><li>in the search bar type “pubsubclient” and download the one by Nick O’Leary</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NuC_6o5SOA_LWDmh-GeK6w.png" /></figure><ul><li>To download the library, simply click on it, then select “Add to Project” and choose the project where your code is located.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pmcOxHT6fbAELbHEar4RFA.png" /></figure><p><strong>13</strong>. <strong>Replace “XXXX” in your </strong>main.cpp<strong>with your actual data:</strong></p><ul><li>Enter your WiFi network SSID (Network Name) and password in the following code:</li></ul><pre>// Wi-Fi credentials<br>const char* ssid = &quot;myWiFiNetwork&quot;;<br>const char* password = &quot;12345678&quot;;</pre><ul><li>the mqtt_broker variable and the mqtt_portcan be found on the <strong>Overview </strong>page on HiveMQ website</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2FFT3PBFDJHStEmocgFqg.png" /></figure><ul><li>mqtt_username and mqtt_password are the access credentials we have created before</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_s_jm6NuuxBhujUTYrdr6w.png" /></figure><pre>const char* mqtt_broker = &quot;ef8cad1c347a41558a14872020e14a9b.s1.eu.hivemq.cloud&quot;;<br>const int mqtt_port = 8883;<br>const char* mqtt_username = &quot;ShehabOnMedium&quot;;<br>const char* mqtt_password = &quot;@Sh#51Xj161S&quot;;</pre><p><strong>14</strong>. Name your topic as you like, but I recommend using this hierarchical format: esp32/ir_sensor</p><pre>// MQTT topic for IR sensor<br>const char* topic_publish_ir = &quot;esp32/ir_sensor&quot;;</pre><p><strong>15</strong>. after you have finished all the previous steps you are ready to build your code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*lRagstu3s_Kete2LpTrugQ.png" /></figure><p><strong>16</strong>. once you see that it’s compiled successfully, Upload your code while you are pressing the BOOT button on your ESP32 and release the button when you see “writing….” on your terminal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-KZ5SpbKjC5qSNH38Goag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*gUIz8RfiKfU57_HV-4utKw.png" /></figure><p><strong>17</strong>. Go to your Serial Monitor. You should see that the ESP32 is connected to the WiFi, then to the MQTT broker, and the sensor readings will be displayed directly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*N3HOhoaN_33Dvp9x26ccsg.png" /></figure><p><strong>18</strong>. Now, go to the <strong>Web Client</strong> page on the HiveMQ website, enter the credentials you created earlier, and then click “Connect.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lmQAV8uQWkkxYKhNUGRP0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IN_O2WVGSQ-gWgDOCA9dNw.png" /></figure><p><strong>19</strong>. scroll down to the topic subscription part and type the topic name that you have already created in the code . in our case it was esp32/ir_sensor</p><p><strong>Note</strong>: delete the hash # if it exist by default as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_gNVrxQbAziPjTDf8sB59g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HAqO4PBsPeHR4mous6ul1g.png" /></figure><p>Once you click “Subscribe,” you will see the IR sensor readings appear live on your screen in the Messages section of the HiveMQ website, as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*w_BUiTIco-grFf5IOEAckg.png" /></figure><p><strong>At this point, you have learned how to:</strong></p><ul><li>Connect the ESP32 to WiFi and the MQTT broker<strong>.</strong></li><li>Publish sensor readings to the MQTT broker<strong>.</strong></li><li>Subscribe to a topic and view live sensor data on the HiveMQ web client.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*kM0zagUqaFSjLTlZzzZf2Q.png" /></figure><h3><strong>BONUS:</strong></h3><p>Now, let’s send messages to the ESP32 using the HiveMQ Web Client. By enabling bi-directional communication, the ESP32 can both publish data to a topic and subscribe to another topic to receive messages. To set this up, create a topic that the ESP32 will subscribe to in order to receive and process messages.</p><p>Here is the last code we used for streaming IR sensor data, now modified to receive messages by defining the mqttCallback() function to handle received messages and using mqttClient.subscribe() to subscribe to the topic esp32/receive:</p><pre>#include &lt;Arduino.h&gt;<br>#include &lt;WiFi.h&gt;<br>#include &lt;WiFiClientSecure.h&gt;<br>#include &lt;PubSubClient.h&gt;<br><br>// Wi-Fi credentials<br>const char* ssid = &quot;XXXX&quot;;<br>const char* password = &quot;XXXXXX&quot;;<br><br>// MQTT broker details private<br>const char* mqtt_broker = &quot;XXXXXXXXX&quot;;<br>const int mqtt_port = 8883;<br>const char* mqtt_username = &quot;XXXX&quot;;<br>const char* mqtt_password = &quot;XXXXX&quot;;<br><br>// MQTT topics<br>const char* topic_publish_ir = &quot;esp32/ir_sensor&quot;;<br>const char* topic_subscribe = &quot;esp32/receive&quot;; // Topic to receive messages<br><br>// IR Sensor details<br>const int ir_sensor_pin = 34; // GPIO pin connected to the IR sensor<br><br>// Create instances<br>WiFiClientSecure wifiClient;<br>PubSubClient mqttClient(wifiClient);<br><br>// Variables for timing<br>long previous_time = 0;<br><br>// Callback function to handle incoming messages<br>void mqttCallback(char* topic, byte* payload, unsigned int length) {<br>  Serial.print(&quot;Message arrived [&quot;);<br>  Serial.print(topic);<br>  Serial.print(&quot;]: &quot;);<br>  String message;<br>  for (int i = 0; i &lt; length; i++) {<br>    message += (char)payload[i];<br>  }<br>  Serial.println(message);<br><br>  // Handle the message, e.g., turn on/off an LED based on message<br>  if (message == &quot;ON&quot;) {<br>    Serial.println(&quot;Turning on LED&quot;);<br>    // Do something, like turning on an LED<br>  } else if (message == &quot;OFF&quot;) {<br>    Serial.println(&quot;Turning off LED&quot;);<br>    // Do something, like turning off an LED<br>  }<br>}<br><br>void setupMQTT() {<br>  mqttClient.setServer(mqtt_broker, mqtt_port);<br>  mqttClient.setCallback(mqttCallback);<br>}<br><br>void reconnect() {<br>  Serial.println(&quot;Connecting to MQTT Broker...&quot;);<br>  while (!mqttClient.connected()) {<br>    Serial.println(&quot;Reconnecting to MQTT Broker...&quot;);<br>    String clientId = &quot;ESP32Client-&quot;;<br>    clientId += String(random(0xffff), HEX);<br>    <br>    if (mqttClient.connect(clientId.c_str(), mqtt_username, mqtt_password)) {<br>      Serial.println(&quot;Connected to MQTT Broker.&quot;);<br><br>      // Subscribe to the control topic<br>      mqttClient.subscribe(topic_subscribe);<br>    } else {<br>      Serial.print(&quot;Failed, rc=&quot;);<br>      Serial.print(mqttClient.state());<br>      Serial.println(&quot; try again in 5 seconds&quot;);<br>      delay(5000);<br>    }<br>  }<br>}<br><br>void setup() {<br>  Serial.begin(115200);<br>  <br>  WiFi.begin(ssid, password);<br>  while (WiFi.status() != WL_CONNECTED) {<br>    delay(500);<br>    Serial.print(&quot;.&quot;);<br>  }<br>  Serial.println(&quot;&quot;);<br>  Serial.println(&quot;Connected to Wi-Fi&quot;);<br><br>  // Initialize secure WiFiClient<br>  wifiClient.setInsecure(); // Use this only for testing, it allows connecting without a root certificate<br>  <br>  setupMQTT();<br><br>  pinMode(ir_sensor_pin, INPUT); // Set IR sensor pin as input<br>}<br><br>void loop() {<br>  if (!mqttClient.connected()) {<br>    reconnect();<br>  }<br>  mqttClient.loop();<br><br>  long now = millis();<br>  if (now - previous_time &gt; 1000) { // Publish every 10 seconds<br>    previous_time = now;<br><br>    // Read the IR sensor value<br>    int ir_sensor_value = analogRead(ir_sensor_pin);<br>    int distance = map(ir_sensor_value, 0, 4095, 0, 30);<br>    <br>    // Convert the value to a string<br>    String ir_value_str = String(distance);<br>    <br>    // Publish the sensor value to the MQTT topic<br>    Serial.print(&quot;IR Sensor Value: &quot;);<br>    Serial.println(ir_value_str);<br>    mqttClient.publish(topic_publish_ir, ir_value_str.c_str());<br>  }<br>}</pre><p>After building and uploading your code, now go to the HiveMQ Web Client and connect using your saved credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RJ-YnZCUt2XSjdub5_ClJg.png" /></figure><p>Scroll down to the “Messages” section, enter your topic and message, then click “Send Message”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUk7diURbMIivaBUpQ10_w.png" /></figure><p>Go to your serial Monitor and you should see the messages being displayed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*-yH6KJXgN_Vnf7_iFvDAkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gRXMnf-rUyIogHDcw4o6Ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*zMyojLEy3aj6imXo2cZI0A.png" /></figure><p>From this point, you can now control the ESP32 by sending messages to it, such as turning an LED on or off, or moving a servo motor.</p><p>In the message section of the HiveMQ Web Client, you’ll find QoS options that specify the level of message delivery assurance. Simply put, <strong>QoS (Quality of Service)</strong> in MQTT determines how reliably a message is delivered from the sender to the receiver. There are three QoS levels:</p><p><strong>1. QoS 0 (At Most Once):</strong></p><ul><li>The message is delivered at most once, with no acknowledgment required. It’s the fastest but least reliable, as the message might not be delivered if the client disconnects.</li></ul><p><strong>2. QoS 1 (At Least Once):</strong></p><ul><li>The message is guaranteed to be delivered at least once. The sender waits for an acknowledgment from the receiver, but duplicates might occur.</li></ul><p><strong>3. QoS 2 (Exactly Once):</strong></p><ul><li>The message is guaranteed to be delivered exactly once. It involves the most overhead with multiple acknowledgments to ensure no duplication or loss.</li></ul><p>Choosing the appropriate QoS level depends on the importance of the message and the network conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*xsoRjMln-indcfYRXkW7uw.png" /></figure><p>Thank you for following along with this tutorial! You’ve now learned how to set up and control your ESP32 using MQTT. If you have any questions or need further assistance, feel free to reach out. Happy tinkering, and see you in the next project!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8813f48cb1a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/engineering-iot/connecting-esp32-to-hivemq-for-real-time-iot-data-streaming-with-mqtt-8813f48cb1a4">Connecting ESP32 to HiveMQ for Real-time IoT Data Streaming with MQTT</a> was originally published in <a href="https://medium.com/engineering-iot">Engineering IoT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with ESP32 and PlatformIO: A Step-by-Step Guide]]></title>
            <link>https://medium.com/engineering-iot/getting-started-with-esp32-and-platformio-a-step-by-step-guide-5713e16f3c4b?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5713e16f3c4b</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[platformio]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 10:00:55 GMT</pubDate>
            <atom:updated>2025-01-25T16:10:16.339Z</atom:updated>
            <content:encoded><![CDATA[<h4>A straightforward guide to set up your ESP32 on your PC using PlatformIO and create your first blinking LED program!</h4><p>You just bought the ESP32 and you have no clue how you can operate it on your PC or Laptop.</p><p>In this guide, we’ll walk you through each step of the setup process, from connecting your ESP32 to your computer to writing and uploading your first program. By the end of this tutorial, you’ll have a good foundation for using the ESP32 and be ready to dive into more complex projects. Let’s get started!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U021kqEf4EDz_dl1itoIgg.jpeg" /><figcaption>ESP32</figcaption></figure><p>first you will need a USB to connect the ESP32 to the PC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5XQ1o9am5xnoMYKORhJKg.jpeg" /><figcaption>USB</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8drLRefXUPp0RuKwMlv_5w.jpeg" /></figure><p>ESP32 should have a red light once connected to the PC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*eLUoTkDkCVGjFcKrpASSTw.jpeg" /><figcaption>ESP32 is connected to the PC by the USB</figcaption></figure><p>We are not done yet!</p><p>next we will download the drivers for the ESP32</p><p>here is the link: <a href="https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads">https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads</a></p><p>Choose the one with the option Virtual COM Port (VCP) drivers for CP210x devices. VCP drivers allow the CP210x devices to appear as standard COM ports on the PC which we will be using.</p><p>I am using Windows so that&#39;s why I picked this version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yM9m-EqISfnYysPxDVN5Cw.png" /></figure><p>Once the file is downloaded , extract it and setup the program</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*ILpAL50mF2y3_-SVuiiZjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*Gs1guvnax0stgi866Pwq8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*jfzIJ117FgncID4wrMgmgg.png" /><figcaption>Next</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*OCG_E7RywMKsR-eBIlMmpA.png" /><figcaption>accept then Next</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*-H2GZ0LVnR1NyoOAKvGXVA.png" /><figcaption>Finish</figcaption></figure><p>Now go to the search bar in your PC and Type “Device Manager”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*KaYXy_f2OYJLtI4O7VPhPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*NOT1YntdF9ADHnNb4nI04w.png" /></figure><p>look for “Ports” and make sure you still connecting the ESP32 to you PC with the USB cable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*QHc9sFR3-tg8NQZ5tpGanQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*uqnh1v2NUXynp9YlP_BPQQ.png" /></figure><p>If you reached this part you are good to go with the code in Visual Studio Code but first lets setup the PlatformIO on Visual Studio Code</p><p><strong>make sure you already have visual studio Code on your PC, If you haven’t already, download and install it from </strong><a href="https://code.visualstudio.com/"><strong>here</strong></a><strong>.</strong></p><h4>Installing PlatformIO Steps:</h4><ol><li>open Visual Studio Code</li><li>go to “Extensions”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*T4ip5AzcfrY7LDZdfbIfkQ.png" /></figure><p>3 . Search for “PlatformIO” and install the extension</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*d807K1kmHCdKST4scygNlA.png" /><figcaption>install the extension</figcaption></figure><p>once you download it your window should look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M17pApQ5wboYsuKNX-RzsQ.png" /></figure><p>Now select “New Project”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*rq5agxiGAuzZ8KmRSCPymg.png" /></figure><p>Give your project a name and choose your board type (in my case it’s “Espressif ESP32 Dev Module” ), finally set the Framework to “Arduino”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*d7oItVXojjlOz6j2hmhExQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0VsQ6390lb8R5v57IIysOA.jpeg" /></figure><p><strong>Tip: </strong>if you can’t identify your board type, you can take a clear picture of the your ESP32 and give it to ChatGPT with this prompt:</p><p>“this is picture of my ESP32, help me identify the board type as I setup it on PlatformIO”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*W9gB2p2GZyUOIA_krvFtJA.png" /></figure><p><strong>pretty cool right!</strong></p><p>once you have done click “Finish”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/121/1*bitRb4T147tFqyRbqoTawA.png" /></figure><p>your window should look like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SNEBqGgpTJ-mlSTENNk7dQ.png" /></figure><p>now go to “src” and open “main.cpp”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ePHhWq4XIDggY1sC2NZ5Eg.png" /><figcaption>here is where you will write your code in C++</figcaption></figure><p>Now let’s try a simple yet cool program to check that the ESP32 is working properly</p><p>here is a program that will <strong>blink the built-in LED</strong> on your ESP32:</p><pre>#include &lt;Arduino.h&gt;<br>#define LED_BUILTIN 2<br><br>void setup()<br>{<br>  pinMode(LED_BUILTIN, OUTPUT);<br>  Serial.begin(115200);<br>  Serial.println(&quot;\nHello from the setup&quot;);<br>}<br><br>void loop()<br>{<br>  delay(1000);<br>  digitalWrite(LED_BUILTIN, HIGH);<br>  Serial.println(&quot;Hello from the loop&quot;);<br>  delay(1000);<br>  digitalWrite(LED_BUILTIN, LOW);<br>}</pre><p>Next go to the file “platform.ini”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/184/1*lNf6GSMMymjfYApdMSnKag.png" /></figure><p>add these two lines to the file</p><pre>monitor_speed = 115200<br>upload_port = COM3</pre><p>your “platform.ini” file should be similer to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*FQ2n4ODxL6rlTaF9Jcr6ng.png" /></figure><p>And to make sure that your Port is “<strong>COM3</strong>&quot; , which is the default but to make sure go to Device manager &gt; Ports and you will see the port type there as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*jkzyV1OD0bOjnMCQNcbVNQ.png" /></figure><p>once you write your code, you have to <strong>Build</strong> then <strong>Upload </strong>respectively</p><h4>1. build:</h4><p>to build click this button on the bottom status bar (highlighted with yellow)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*aAjSZNSkHETFqgzPTMe4ww.png" /><figcaption>build</figcaption></figure><p>Or from the top right page as shown</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*M718MhLYI2jhFlf6d9MTTw.png" /></figure><p>Wait for the program to compile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*uuNsfb7Dqv7VxFIB8bq8iw.png" /></figure><p>and Congratulations on your First build !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ov4lZyblYE9ibgmZRxuc0A.png" /></figure><h4>2. upload:</h4><p>to upload your code click on this button beside the build button on the bottom status bar (highlighted with yellow)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*Wm2WZsN4HYeaPW4D_1EPqw.png" /></figure><p>Or from the top right page as shown</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*fzDd8YEzNbbwB5xEFfvNMg.png" /></figure><p><strong>Note: </strong>if you had this Error while uploading you might have to <strong>hold the button “BOOT”</strong> in your ESP32 <strong>while uploading</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bUlg7dbcWRBclt5Cr4jG4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qpkoKpgfT8l4QJAGht-C2w.jpeg" /></figure><p>Release the “BOOT” button once you see this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*v8JfG0LCTU8Q8YUcDzPe2g.png" /></figure><p>And you are done uploading …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5YACC4mi0gLg_8qgoxCU_g.png" /></figure><p>Once it’s done uploading you should see an LED blinking on your ESP32</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVqWtw1oNHN0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FVqWtw1oNHN0%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVqWtw1oNHN0%2Fhq2.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/da07c9726edc31f1f66abf8879e427a3/href">https://medium.com/media/da07c9726edc31f1f66abf8879e427a3/href</a></iframe><p>If you find this tutorial clear and helpful, please give it a like! If you have any suggestions or feedback, feel free to share them in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5713e16f3c4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/engineering-iot/getting-started-with-esp32-and-platformio-a-step-by-step-guide-5713e16f3c4b">Getting Started with ESP32 and PlatformIO: A Step-by-Step Guide</a> was originally published in <a href="https://medium.com/engineering-iot">Engineering IoT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking the full Power of AI by Mastering Effective Prompting]]></title>
            <link>https://medium.com/@shehab2003magdy/unlocking-the-full-power-of-ai-by-mastering-effective-prompting-67b861c56b03?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/67b861c56b03</guid>
            <category><![CDATA[prompt]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[gen-ai-tools]]></category>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Mon, 08 Jul 2024 18:45:25 GMT</pubDate>
            <atom:updated>2024-07-10T13:00:38.530Z</atom:updated>
            <content:encoded><![CDATA[<h4>Discover the secrets to creating prompts that deliver exceptional AI results every time!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*txjfdc9UeG1mcbUx" /><figcaption>Photo by <a href="https://unsplash.com/@siva_photography?utm_source=medium&amp;utm_medium=referral">Levart_Photographer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In today’s world, Artificial Intelligence (AI) has steadily moved from science fiction movies to an essential part of our daily lives. Whether you like it or not, it’s the reality, and we have to deal with it. When you hear about how AI will take our places in many jobs, you might laugh or refuse to accept the idea.</p><p>You might try to prove your point by interacting with a Large Language Model (LLM) like ChatGPT and observing its responses. Impressive, yes, but you might still think of it as a “stupid” entity that can memorize a lot of data and hallucinate too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*GTAM6xNASNtpLsoe.jpg" /><figcaption>a funny example of how AI can Hallucinate</figcaption></figure><p>Another example of denial is when you hear about AI generating images. You might try to prove your point by looking at these AI-generated images and laugh at how a person in the image might have no face or seven fingers on one hand. You think, “This is stupid enough not to take my job.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HeP7Fhh7xOIdRlCv" /><figcaption>DALL-AI trying to create hands with <strong>extra</strong> <strong>fingers</strong></figcaption></figure><p>What if I told you that you are <strong>right</strong>!</p><p>This naive piece of tech will not take your job unless we enhance its capabilities and use it properly through the <strong>magic of prompting</strong>.</p><p>First, let’s talk about the generated images with “alien fingers.” How can we overcome this problem and make the AI create a perfect image? Simply by using paid GenAI tools. Almost every paid tool can overcome this problem. Alternatively, you can use free tools but repeat and refine the prompt until you achieve the desired result.</p><p>But what is prompting, and how can you craft a good one?</p><p>In this article, I will give you the cheatsheet to craft the perfect prompt for every purpose with any GenAI.</p><p><strong>Prompting</strong> is the process of providing AI with a <strong>context</strong> that guides its responses or actions. Getting good at this will help you harness the full potential of the technology..</p><h3>Writing Effective Prompts:</h3><ol><li><strong>Be clear and precise</strong>: Ensure your prompts clearly state what you need.</li><li><strong>Understand AI capabilities:</strong> design your prompts based on what the AI is designed to do. Consider whether you are using the free version or the paid version because it’s significantly different. Images generated by paid GenAI are often indistinguishable from real ones.</li><li><strong>Use open-ended questions wisely</strong>: They can lead to broader and potentially more creative responses with more ideas and new concepts. It’s nearly the same approach when talking to an actual human..</li><li><strong>Follow-up prompts:</strong> For longer questions, break down the query into specific, shorter questions and send one after the next to get better understanding and better outputs.</li></ol><blockquote>The better your instructions, the better the AI can perform the task or answer your question.</blockquote><h3>The Six Building Blocks of a Perfect Prompt:</h3><ol><li>Task</li><li>Context</li><li>Exemplars</li><li>Persona</li><li>Format</li><li>Tone</li></ol><p>Rather than going into details of every block, I will provide you with a clear example so that you can follow.</p><h4>prompt:</h4><p>“Imagine you are a skilled gym coach with 10 years of experience. I am a 20-year-old healthy male. My height is 175 cm, and my weight is 70 kg. I have been going to the gym for 2 years now, looking to achieve the best shape to appear fit. Draft a tailored diet and training workout plan to make me fit and healthy. Start by making a day-to-day workout plan that covers all the muscles, ensuring that my workout will not exceed two hours. Also, include three meals for each day for 30 days, excluding Fridays. Use a tabular form to showcase the results of the plan. Use a professional yet approachable tone of an expert real-life coach.”</p><p>Great! Let’s analyze the prompt and place every sentence into each block of the six blocks:</p><ol><li><strong>Persona</strong> : “Imagine You are a skilled gym coach with 10 years experience.”</li><li><strong>Context</strong> : “I am a 20 years old healthy male my height is 175 and my weight is 70 KG I have been going to the gym for 2 years now looking to make the best shape to appear fit.”</li><li><strong>Task : “</strong>Draft a tailored Diet and training workout plan to make me fit and healthy.<strong>”</strong></li><li><strong>Exemplars</strong> : Start making a day to day workout plan that cover all the muscles in knowing that my workout will not be more than two hours and also include the 3 meals for each day for 30 days and exclude Fridays.</li><li><strong>Format : “</strong>Use a tabular form to showcase the results of the plan<strong>”</strong></li><li><strong>Tone : “</strong>Use a professional yet approachable tone of an expert real life coach”</li></ol><p>Here is what I got :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*SC414wr5RV6PvvI7awKoCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*fxQd_ZRvUmwpmJ5d_0Eo3w.png" /></figure><p>Impressive right !</p><p>By using these ideas of prompting, you will excel in every field and with any LLM, not just ChatGPT.</p><p><strong>Note</strong>: You don’t have to use all six blocks every time. It depends on the desired output.</p><p>Here’s a bonus site offering<strong> ready-to-use</strong> prompts for all your prompt needs at <a href="https://promptadvance.club/chatgpt-prompts">PromptAdvance</a></p><p>In the end, I hope I helped you better understand and craft prompts. Special thanks to ALX for providing me with their amazing AI course, AiCE, which greatly improved my proficiency with AI and AI tools.</p><p>Do you have any thoughts on this topic? Feel free to share them in the comments below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67b861c56b03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Difference Between Probability and Likelihood]]></title>
            <link>https://medium.com/@shehab2003magdy/understanding-the-difference-between-probability-and-likelihood-fb91b3dca43e?source=rss-57931a7170c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb91b3dca43e</guid>
            <dc:creator><![CDATA[Shehab Magdy]]></dc:creator>
            <pubDate>Mon, 01 Jul 2024 19:18:57 GMT</pubDate>
            <atom:updated>2024-07-01T22:37:36.660Z</atom:updated>
            <content:encoded><![CDATA[<p>In the field of data science, the terms “probability” and “likelihood” are often used interchangeably. However, they have distinct meanings that are crucial to understand…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QpLkUkeHt2UUgr9e" /><figcaption>Photo by <a href="https://unsplash.com/@tamiminaser?utm_source=medium&amp;utm_medium=referral">Naser Tamimi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Assuming you are a student who has encountered a course or a book about probability, whether you are learning for your career or for more knowledge in general, you will come across the terms “probability” and “likelihood.”</p><p>People and dictionaries often use both terms interchangeably to express the uncertainty of an event occurring, or in other words, how likely something is to happen. This is a common mistake and understandable, as the nuances can seem similar.</p><p>Furthermore, some language translation tools like Google Translate or Yandex may refer to these terms with the same word in other languages, which might cause confusion. For example, an Arabic speaker might find the translation of both terms to be identical as shown in the screenshots below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5D2hZR4TfsiacpXHuVwvZw.png" /></figure><p>However, “probability” and “likelihood” are not the same, especially from the perspective of applied science. Let’s explore the actual differences between them by understanding their definitions and key differences.</p><h4>Definition</h4><ul><li><strong>probability</strong> : The chance of an event occurring or a hypothesis being true.</li><li><strong>Likelihood </strong>: the process of determining the best data distribution given a specific situation in the data.</li></ul><blockquote>“Probability is about quantifying predictions of events yet to happen, whereas likelihood is measuring the frequency of events that already occurred. In statistics and machine learning, we often use likelihood (the past) in the form of data to predict probability (the future)”</blockquote><blockquote>— Thomas Nield , Essential Math for Data Science</blockquote><h4>Usage</h4><ul><li><strong>probability</strong> : Used to predict future events . It’s like asking, “What are the odds of this happening?”</li><li><strong>Likelihood </strong>: Used to evaluate how well a statistical model fits observed data. It’s like asking, “Given the data we have, how likely is this explanation to be true?&quot;</li></ul><h4>Mathematical representation</h4><ul><li><strong>probability</strong> : P(A|B) — probability of A given B</li><li><strong>Likelihood </strong>: L(θ|x) — likelihood of parameters θ given observed data x , The data that we are going to use to estimate the parameters are going to be <em>n</em> independent and identically distributed (IID) samples: X<em>1</em>,X<em>2</em>,…X<em>n</em> .</li><li>we assumed that each data point is independent, the likelihood of all of our data is <strong>the product of the probability of each data point</strong> .</li><li>Mathematically, the likelihood of our data given parameters θ is:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*iLZbSq7rcdpQ8YHd49Pa6g.png" /></figure><ul><li>For different values of parameters, the likelihood of our data will be different. Correct parameters will make our data more probable than incorrect parameters.</li></ul><h4>Range</h4><ul><li><strong>probability</strong> : Always between 0 (impossible) and 1 (certain).</li><li><strong>Likelihood </strong>: Can be any non-negative number, not necessarily between 0 and 1. it doesn’t have a single value and is often expressed as a function.</li></ul><h4>Application in statistics</h4><ul><li><strong>probability</strong> : Used in hypothesis testing.</li><li><strong>Likelihood </strong>: Core concept in maximum likelihood estimation (MLE) and Bayesian inference.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b9wBIV-tWpevmH-Z" /><figcaption>Photo by <a href="https://unsplash.com/@edge2edgemedia?utm_source=medium&amp;utm_medium=referral">Edge2Edge Media</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>in the end, I hope I was able to change your mind and show you the actual differences between the two terms. if you are interested in Data Science and Data analytics follow for more. my content will be dedicated to these topics and mainly to Data!</p><p>Do you have any thoughts on this topic? Feel free to share them in the comments below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb91b3dca43e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>