<?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 Abdul Rafay on Medium]]></title>
        <description><![CDATA[Stories by Abdul Rafay on Medium]]></description>
        <link>https://medium.com/@99marafay?source=rss-c4e6e8cbe6bc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3YGlUrJBYiSJ0AqyRaX5qg.jpeg</url>
            <title>Stories by Abdul Rafay on Medium</title>
            <link>https://medium.com/@99marafay?source=rss-c4e6e8cbe6bc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:00:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@99marafay/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[Astro: Automating Scheduling for Your Site]]></title>
            <link>https://medium.com/@99marafay/astro-automating-scheduling-for-your-site-428b954332ac?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/428b954332ac</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[2013-schdule]]></category>
            <category><![CDATA[astros]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Sun, 04 May 2025 19:00:52 GMT</pubDate>
            <atom:updated>2025-10-06T21:39:54.639Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*InwU1l-IivOiCR8_67RpJA.png" /><figcaption>Thumnail</figcaption></figure><p>If you know me, you already know I love writing blog posts like a story — taking you on a little journey while telling you what’s happening. Today is no different.</p><p>Last night, while I was writing a blog post, a thought popped into my mind. I had set the blog post’s publish date sometime in the future. But I knew myself well — when that day came, I would definitely forget to <strong>enable</strong> that blog post manually.</p><p>And guess what? After a few months, that blog post would still be stuck there — unpublished — because I forgot to change draft: true to draft: false.<br>That pissed me off so much. Like seriously - what the hell? I wrote the blog, finished it, set the publish date, but it would still sit there hidden just because I wanted to space out my posts instead of dumping them all at once.</p><p>The blog was <strong>done</strong>. It was <strong>built</strong> with the site files. It was just sitting there, needing to be enabled.<br>Sounds simple to fix, right?<br>Well… not so much.</p><p>Like every other software engineer when they’re stuck, I went to Google and searched:<br>auto schedule a post in astro</p><p>I came across a few blog posts that were close to what I was looking for — and honestly, they were <strong>so well written</strong> that I highly recommend you read them:</p><p>Both blog posts made some solid points, and I genuinely enjoyed reading them.<br>But… they didn’t exactly solve the problem <strong>I</strong> was facing.</p><p>So, like any desperate developer, I asked AI for suggestions.<br>Spoiler alert: the AI suggestions were a complete <strong>miss</strong> for brainstorming.<br>Sometimes AI can help. Sometimes it just makes you want to close your laptop and go outside.<br>But before I explain how I <em>actually</em> solved the problem, you first need to understand <strong>why</strong> this problem exists.</p><h3>The Static Site Conundrum</h3><p>Astro is a <strong>static site generator</strong>. Everything for my site is built ahead of time and hosted on GitHub — <strong>there’s no backend</strong>. (If you’re interested, I explained my entire website setup in this <a href="https://www.rafay99.com/blog/solving-asset-bloat-with-image-composer/">blog post</a>, but here’s the TL;DR:<br>Everything is static. Every change requires a <strong>full rebuild</strong> of the site.) Because of this, any functionality that needs <strong>dynamic behavior</strong> (like auto-scheduling posts) <strong>can’t just magically happen</strong> at runtime.<br>There’s no server to “wake up” on a certain day and publish the post. The site is already frozen in time until the next rebuild.</p><p>So what’s the solution?</p><h3>The Solution: Simpler Than It Seemed</h3><p>The solution, at its core, turned out to be pretty simple and straightforward — but it definitely needed some thought. I already had metadata defined for every blog post. If you haven’t seen it before, here’s an example:</p><pre>---<br>title: Is AI Just Hype or Something More?<br>description: &gt;-<br>  Unveiling the truth behind AI: is it a revolutionary force or just a glorified autocomplete?<br>pubDate: 2024-09-30T19:00:00.000Z<br>draft: false<br>heroImage: /BlogImages/Is AI Just Hype or Something More.webp<br>authorName: Abdul Rafay<br>authorAvatar: /author.jpg<br>tags:<br>  - AI<br>---</pre><p>This is from one of my older posts. Now if you look closely, there are two fields that matter: pubDate and draft. Based on the pubDate, I needed a way to automatically flip the draft value from true to false once the scheduled date arrived. Simple, right? Except... how was I supposed to do it? Manually updating it every time wasn&#39;t realistic. I needed something automatic. And that&#39;s when GitHub Actions came into the picture.</p><h3>The Logic Behind It</h3><p>Before diving into what I actually built inside the GitHub Action, I had to map out the logic. It was pretty straightforward when I thought about it. I just needed to loop through all the .md and .mdx files (my blog posts), read their metadata, check if the pubDate had already passed, and then see what the draft status was. If the post was still marked as draft: true even after the pubDate had passed, I would update it to draft: false. And if the pubDate was still in the future, I wouldn&#39;t touch it. Clean, simple, and something that could easily be scripted.</p><h3>The Script Journey: JavaScript vs Python</h3><p>With the logic sorted, I sat down and started writing the script — in JavaScript, because why not? I figured it would be quick. Spoiler alert: it was not. File manipulation with JavaScript turned out to be way more painful than I had expected. It wasn’t that it was impossible — it was just… annoying. Everything felt clunky. I kept running into issues, and on top of that, I had to install a bunch of packages just to do basic file handling.</p><p>At one point, I just stopped and thought about it. I remembered that a friend of mine had done something similar before — not blog posts, but handling big research papers, identifying different sections and modifying content automatically. They used Python for it. And at that moment, it clicked. I scrapped all the JavaScript code without a second thought and rewrote everything in Python from scratch. It was so much smoother, and honestly, it made me wonder why I hadn’t started there in the first place.</p><h3>Code Base Breakdown</h3><pre>import os<br>import sys<br>from pathlib import Path<br>from datetime import datetime, timezone, date<br>import yaml<br>import re<br>import logging<br><br>logging.basicConfig(<br>    level=logging.INFO,<br>    format=&#39;%(asctime)s - %(levelname)s - [%(filename)s:%(lineno)d] - %(message)s&#39;,<br>    datefmt=&#39;%Y-%m-%d %H:%M:%S&#39;<br>)<br><br>BLOG_CONTENT_DIR = Path(&quot;src/content/blog&quot;)<br><br>def extract_frontmatter(content: str, file_name: str):<br>    &quot;&quot;&quot;<br>    Extracts YAML frontmatter from Markdown content.<br>    Returns (metadata_dict, body_content, original_yaml_str) on success,<br>    or (None, None, None) on failure. Logs warnings/errors.<br>    &quot;&quot;&quot;<br>    match = re.match(r&#39;^---\s*\n(.*?)\n---\s*\n&#39;, content, re.DOTALL)<br>    if not match:<br>        logging.debug(f&quot;No YAML frontmatter delimiters found in {file_name}&quot;)<br>        return None, None, None<br><br>    yaml_content_str = match.group(1)<br>    body_content = content[match.end():]<br><br>    try:<br>        metadata = yaml.safe_load(yaml_content_str)<br>        if isinstance(metadata, dict):<br>            logging.debug(f&quot;Successfully extracted metadata for {file_name}&quot;)<br>            return metadata, body_content, yaml_content_str<br>        else:<br>            logging.warning(f&quot;Frontmatter in {file_name} parsed but is not a dictionary (type: {type(metadata)}). Skipping file.&quot;)<br>            return None, None, None<br>    except yaml.YAMLError as e:<br>        logging.error(f&quot;Error parsing YAML frontmatter in {file_name}: {e}. Skipping file.&quot;)<br>        return None, None, None<br>    except Exception as e:<br>        logging.error(f&quot;Unexpected error parsing YAML in {file_name}: {e}. Skipping file.&quot;)<br>        return None, None, None<br><br><br>def publish_post_if_ready(file_path: Path):<br>    &quot;&quot;&quot;<br>    Checks pubDate and updates draft status if needed for a single file.<br>    Returns True if the file was updated, False otherwise.<br>    Logs details, warnings, and errors encountered during processing.<br>    &quot;&quot;&quot;<br>    made_change = False<br>    file_name = file_path.name<br><br>    try:<br>        logging.debug(f&quot;Processing file: {file_name}&quot;)<br>        content = file_path.read_text(encoding=&#39;utf-8&#39;)<br><br>        metadata, body, original_yaml = extract_frontmatter(content, file_name)<br><br>        if metadata is None:<br>            return False<br><br>        is_draft = metadata.get(&#39;draft&#39;)<br>        pub_date_value = metadata.get(&#39;pubDate&#39;)<br><br>        logging.debug(f&quot;File: {file_name}, Draft Status: {is_draft}, PubDate Value: {pub_date_value} (Type: {type(pub_date_value).__name__})&quot;)<br><br>        if is_draft is True:<br>            if pub_date_value is not None:<br>                pub_date_dt = None<br>                try:<br>                    if isinstance(pub_date_value, datetime):<br>                        logging.debug(f&quot;Handing pubDate for {file_name} as datetime object.&quot;)<br>                        pub_date_dt = pub_date_value<br>                        if pub_date_dt.tzinfo is None or pub_date_dt.tzinfo.utcoffset(pub_date_dt) is None:<br>                            logging.debug(f&quot;Making naive datetime UTC for {file_name}&quot;)<br>                            pub_date_dt = pub_date_dt.replace(tzinfo=timezone.utc)<br><br>                    elif isinstance(pub_date_value, date) and not isinstance(pub_date_value, datetime):<br>                         logging.debug(f&quot;Handing pubDate for {file_name} as date object, converting to datetime.&quot;)<br>                         pub_date_dt = datetime(pub_date_value.year, pub_date_value.month, pub_date_value.day, 0, 0, 0, tzinfo=timezone.utc)<br><br>                    elif isinstance(pub_date_value, str):<br>                        logging.debug(f&quot;Handing pubDate for {file_name} as string, parsing.&quot;)<br>                        parsed_date_str = pub_date_value.replace(&#39;Z&#39;, &#39;+00:00&#39;)<br>                        pub_date_dt = datetime.fromisoformat(parsed_date_str)<br>                    else:<br>                        logging.warning(f&quot;Unexpected type for pubDate in {file_name}: {type(pub_date_value)}. Cannot compare date.&quot;)<br><br>                    if pub_date_dt:<br>                        now_utc = datetime.now(timezone.utc)<br>                        logging.debug(f&quot;Comparing pubDate {pub_date_dt} with current time {now_utc} for {file_name}&quot;)<br><br>                        if pub_date_dt &lt;= now_utc:<br>                            logging.info(f&quot;Publishing {file_name} (pubDate: {pub_date_value})&quot;)<br><br>                            new_yaml = re.sub(r&quot;^\s*draft:\s*true\s*$&quot;, &quot;draft: false&quot;, original_yaml, flags=re.MULTILINE | re.IGNORECASE)<br><br>                            if new_yaml == original_yaml:<br>                                 logging.debug(f&quot;Regex replacement failed for &#39;draft: true&#39; in {file_name}, trying string replace.&quot;)<br>                                 temp_yaml = original_yaml.replace(&#39;draft: true&#39;, &#39;draft: false&#39;, 1)<br>                                 new_yaml = temp_yaml.replace(&#39;draft: True&#39;, &#39;draft: false&#39;, 1)<br><br><br>                            if new_yaml != original_yaml:<br>                                try:<br>                                    new_content = f&quot;---\n{new_yaml.strip()}\n---\n{body}&quot;<br>                                    file_path.write_text(new_content, encoding=&#39;utf-8&#39;)<br>                                    logging.info(f&quot;Successfully updated draft status to false in {file_name}&quot;)<br>                                    made_change = True<br>                                except IOError as write_err:<br>                                     logging.error(f&quot;Failed to write updated content to {file_name}: {write_err}&quot;)<br>                                except Exception as write_ex:<br>                                     logging.error(f&quot;Unexpected error writing updated content to {file_name}: {write_ex}&quot;)<br>                            else:<br>                                 logging.warning(f&quot;Could not find/replace &#39;draft: true&#39; in {file_name}. Already false or formatted unusually?&quot;)<br>                        else:<br>                             logging.info(f&quot;Skipping {file_name}: Publication date ({pub_date_value}) is in the future.&quot;)<br><br>                except ValueError as e:<br>                    logging.warning(f&quot;Could not process pubDate value &#39;{pub_date_value}&#39; (type {type(pub_date_value).__name__}) in {file_name}: {e}. Skipping date check.&quot;)<br>                except Exception as e:<br>                    logging.error(f&quot;Unexpected error during date processing for {file_name} with value &#39;{pub_date_value}&#39;: {e} (Type: {type(e).__name__})&quot;)<br>            else:<br>                 logging.warning(f&quot;Skipping {file_name}: Draft is true, but &#39;pubDate&#39; key is missing.&quot;)<br>        else:<br>            logging.info(f&quot;Skipping {file_name}: Draft status is not explicitly &#39;true&#39; (current value: {is_draft}).&quot;)<br><br>    except FileNotFoundError:<br>        logging.error(f&quot;File vanished before processing: {file_name}&quot;)<br>    except PermissionError as pe:<br>        logging.error(f&quot;Permission error reading file {file_name}: {pe}&quot;)<br>    except IOError as e:<br>        logging.error(f&quot;IOError reading file {file_name}: {e}&quot;)<br>    except UnicodeDecodeError as ude:<br>        logging.error(f&quot;Encoding error reading file {file_name}. Ensure it&#39;s UTF-8: {ude}&quot;)<br>    except Exception as e:<br>        logging.exception(f&quot;Unexpected error processing file {file_name}: {e}&quot;)<br><br>    return made_change<br><br>def main():<br>    &quot;&quot;&quot;Finds posts and attempts to publish them.&quot;&quot;&quot;<br>    logging.info(&quot;Starting auto-publish script...&quot;)<br>    total_changes = 0<br><br>    if not BLOG_CONTENT_DIR.is_dir():<br>        resolved_path = BLOG_CONTENT_DIR.resolve()<br>        cwd = Path.cwd()<br>        logging.critical(f&quot;Blog content directory not found at expected path: {BLOG_CONTENT_DIR}&quot;)<br>        logging.critical(f&quot;Resolved path attempted: {resolved_path}&quot;)<br>        logging.critical(f&quot;Current working directory: {cwd}&quot;)<br>        logging.critical(&quot;Ensure the script is run from the repository root or BLOG_CONTENT_DIR is correct.&quot;)<br>        sys.exit(1)<br><br>    logging.info(f&quot;Checking posts in directory: {BLOG_CONTENT_DIR}&quot;)<br><br>    try:<br>        files_to_check = list(BLOG_CONTENT_DIR.glob(&quot;*.md&quot;)) + list(BLOG_CONTENT_DIR.glob(&quot;*.mdx&quot;))<br>        logging.info(f&quot;Found {len(files_to_check)} potential post files (.md, .mdx).&quot;)<br><br>        processed_files = 0<br>        for file_path in files_to_check:<br>            if file_path.is_file():<br>                if publish_post_if_ready(file_path):<br>                    total_changes += 1<br>                processed_files += 1<br>            else:<br>                 logging.warning(f&quot;Path found by glob is not a file (skipped): {file_path}&quot;)<br><br>        logging.info(f&quot;Processed {processed_files} files.&quot;)<br><br>    except Exception as e:<br>        logging.exception(f&quot;An unexpected error occurred during file processing loop: {e}&quot;)<br><br>    logging.info(&quot;-&quot; * 20)<br>    if total_changes &gt; 0:<br>        logging.info(f&quot;Script finished. {total_changes} post(s) were updated.&quot;)<br>    else:<br>        logging.info(&quot;Script finished. No posts needed publishing or updating.&quot;)<br>    logging.info(&quot;-&quot; * 20)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>When I started writing the auto-publish script, my main goal was simple:<br>I wanted Markdown or MDX blog posts sitting in a src/content/blog directory to automatically &quot;go live&quot; when their scheduled pubDate arrived - without me having to manually change the draft: true status to false.</p><p>To make that happen, I first set up a clean project structure.<br>Right at the top of the script, I imported essential libraries — os, sys, pathlib for file handling, datetime for managing dates, yaml for parsing the frontmatter metadata, and logging for capturing all sorts of useful debug and error messages.<br>I knew that proper logging was crucial, so I configured a basic logging setup early on, ensuring I could easily spot errors or track the script&#39;s behavior at different verbosity levels.</p><p>Next, I defined a constant BLOG_CONTENT_DIR, which simply points to the folder where all my blog posts reside.<br>This would make it easy to adjust later if needed, instead of scattering the directory path all over the code.</p><p>Then came the core functions.</p><p>I started with extract_frontmatter(), which is responsible for pulling out the YAML block from the beginning of each Markdown file.<br>If the YAML frontmatter was missing or malformed, the function would return early - no point wasting time on a file that isn&#39;t properly formatted.<br>Parsing the YAML safely with PyYAML was important here, and I made sure any strange issues were logged clearly so I wouldn&#39;t be left guessing later.</p><p>The real meat of the script was the publish_post_if_ready() function.<br>This part reads each file, grabs its metadata, and checks if the draft field is still true.<br>If it is, it then compares the pubDate value to the current time (UTC).<br>I made sure to handle a few tricky cases here:<br>Sometimes pubDate might be a full datetime object, sometimes just a date, and sometimes just a string in ISO format.<br>The script carefully parses each possibility, ensuring consistency before doing any comparison.</p><p>If the current time was past the scheduled pubDate, the script would go ahead and update the draft: true in the frontmatter to draft: false, effectively publishing the post.<br>For the update, I tried a safe regular expression replacement first; if that failed (which could happen if the spacing was unusual), the script fell back to a simple string replace to make sure nothing got missed.</p><p>To wrap everything up, the main() function orchestrated the whole process.<br>It scanned the blog directory for .md and .mdx files, tried to process each file individually, and kept track of how many posts it successfully updated.<br>Good error handling was important here - I made sure that even if one file threw an unexpected error, the script would keep running and processing the rest.</p><p>Finally, if something went really wrong — like if the blog directory didn’t even exist — the script would log a critical error and exit gracefully.</p><p>By the time the script finishes, I get a clean summary in the logs: how many posts were updated and any warnings or errors that popped up along the way.<br>This way, I can schedule posts ahead of time and trust that they’ll automatically go live without lifting a finger.</p><h3>GitHub Actions</h3><p>Now let’s talk about GitHub Actions — because honestly, without this part, running the script manually every day would be rough.</p><p>Here’s the deep dive:<br>I created a GitHub Action that sets up Node.js, clones the project, installs the Python dependencies, runs the auto-publish script, checks for any changes, pushes those changes back to the main branch, and finally does some cleanup. This workflow runs <strong>every day</strong> at a scheduled time.</p><p>With the changes pushed to the main branch, Vercel automatically detects the updates and deploys the new blog posts on the correct date.<br>So, in short: automation magic.</p><p>That’s the quick TL;DR of how the GitHub Action fits into this system.</p><p>But if you want to go full nerd, here’s the actual GitHub Action:</p><pre>name: Auto-Publish Astro Blog Posts<br><br>on:<br>  schedule:<br>    - cron: &quot;0 7 * * *&quot;<br>  workflow_dispatch: {}<br><br>jobs:<br>  publish-posts:<br>    runs-on: ubuntu-latest<br>    permissions:<br>      contents: write<br><br>    steps:<br>      - name: Checkout repository<br>        uses: actions/checkout@v4<br><br>      - name: Set up Python<br>        uses: actions/setup-python@v5<br>        with:<br>          python-version: &quot;3.11&quot;<br><br>      - name: Install dependencies<br>        run: pip install PyYAML<br><br>      - name: Run publish script<br>        id: publish_script<br>        run: python scripts/publish_posts.py<br><br>      - name: Check for file changes<br>        id: git_check<br>        run: |<br>          if git diff --quiet --exit-code --ignore-space-change ${{ github.workspace }}/src/content/blog; then<br>            echo &quot;No changes detected in blog posts.&quot;<br>            echo &quot;changes_detected=false&quot; &gt;&gt; $GITHUB_OUTPUT<br>          else<br>            echo &quot;Changes detected in blog posts.&quot;<br>            echo &quot;changes_detected=true&quot; &gt;&gt; $GITHUB_OUTPUT<br>          fi<br><br>      - name: Configure Git user<br>        if: steps.git_check.outputs.changes_detected == &#39;true&#39;<br>        run: |<br>          git config user.name &quot;GitHub Actions Bot&quot;<br>          git config user.email &quot;41898282+github-actions[bot]@users.noreply.github.com&quot;<br><br>      - name: Stage, Commit, and Push changes<br>        if: steps.git_check.outputs.changes_detected == &#39;true&#39;<br>        run: |<br>          git add src/content/blog/<br>          if ! git diff --staged --quiet; then<br>            git commit -m &quot;Auto-publish scheduled blog posts&quot;<br>            echo &quot;Pushing changes...&quot;<br>            git push origin HEAD:${{ github.ref_name }}<br>          else<br>            echo &quot;No effective changes staged after running script, skipping commit/push.&quot;<br>          fi</pre><h3>Final Thoughts</h3><p>This little system saves me a lot of manual effort and just feels… clean.<br>Instead of worrying about whether I scheduled a blog correctly or remembering to manually publish it on the right day, I let a Python script and GitHub Actions handle everything while I sip my coffee.</p><p>Sure, setting it all up took a bit of time — but now, it’s completely hands-off.<br>Write → Schedule → Done.</p><p>Hope you found this useful! If you liked this deep dive (or if you have any cool automation ideas yourself), feel free to reach out.<br>Let’s keep building nerdy, efficient systems.</p><p>Until then, peace out, nerds.❤️❤️</p><p><em>Originally published at </em><a href="https://www.rafay99.com/blog/auto-scheduling-in-astro"><em>https://www.rafay99.com</em></a><em> on May 4, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=428b954332ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Should I Embrace AI Tools for Coding? Will They Help or Reduce My Efficiency?]]></title>
            <link>https://medium.com/@99marafay/why-should-i-embrace-ai-tools-for-coding-will-they-help-or-reduce-my-efficiency-ef5ffdc01731?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef5ffdc01731</guid>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Fri, 08 Nov 2024 19:00:26 GMT</pubDate>
            <atom:updated>2024-11-13T12:29:31.998Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tdNpudt8vz0FXkdGilJ6hg.png" /><figcaption>thubnail</figcaption></figure><p>Not too long ago, as I was working on an Android application, I was scrolling through YouTube, looking for something interesting to watch. Then, YouTube recommended a video to me: <a href="https://www.youtube.com/watch?v=3xu_QrZRYRw&amp;t=174s"><em>Embrace GitHub Copilot, Cursor AI &amp; ChatGPT as a Developer!</em></a>. As a curious developer, I watched the entire video. It raised a question that I’ve been thinking about a lot: should I rely on AI tools to build applications, and if so, how much should I use them? What are the potential side effects?</p><p>I’ve already discussed similar questions in a previous blog post, <a href="https://www.rafay99.com/blog/mylovehaterelationshipwithcopilot"><em>My Love and Hate Relationship with GitHub Copilot</em></a>, where I concluded that it’s best to set boundaries on how much we rely on these tools. But this video only highlighted the benefits of using AI for development. For instance, it pointed out how these tools can generate boilerplate code effortlessly. Generating boilerplate code for a Flutter widget or an HTML page can be tedious, but with AI, you just need to provide a prompt like “create this widget with this title and metadata,” and it gets done in seconds.</p><p>This feature can make life so much easier, especially for tasks that feel more like obstacles than creative work. I want to focus on creating meaningful UI and logic for my app to function, rather than dealing with repetitive code. Another key benefit mentioned in the video was how AI can help refactor code, making it easier to break down components into reusable pieces. This reusability improves maintainability, eases debugging, and facilitates adding new features.</p><p>These are all solid points from the video, but here’s my personal take on using AI tools in development.</p><h3>My Usage</h3><p>Honestly, as a developer, I use these AI tools mainly for learning new technologies and improving UI design. I’m not a front-end developer, but I usually have a vision for what I want to build. I code it, but I know it’s not perfect. That’s when I turn to AI. Here’s an example of a prompt I often use:</p><blockquote><em>Imagine you are a designer and developer with five years of experience. With this expertise, you are tasked with improving a UI. Here is the code. Now, modify this UI to make it better.</em></blockquote><p><strong>For Example</strong> I was working on the Tools section on my own website using Astro, React, and Framer Motion. This was the original code:</p><p>And this is the modified code</p><p>Using this prompt, the AI suggests enhancements that usually address the issues in my design. However, I still tweak things afterward to better fit my vision-whether it’s changing fonts, icons, or colors to align with the overall style of the application.</p><h3>Hot Take</h3><p>Here’s my perspective on AI usage after watching the video and reflecting on my own experiences: AI tools are valuable for learning, refactoring, and improving code structure, but they shouldn’t be overused for generating large chunks of code. Code generated by AI often lacks high quality, security, and precision. And if you’re a new developer without a solid foundation, relying heavily on AI can be harmful. It might weaken your ability to read documentation and hinder your debugging skills.</p><h3>Conclusion</h3><p>In the end, AI tools like GitHub Copilot, ChatGPT, and Cursor AI can be incredibly powerful aids for developers. They can save time on repetitive tasks, help refactor code, and offer learning opportunities, especially for areas outside our expertise. However, it’s essential to use them mindfully. Over-relying on AI for code generation can lead to lower quality, less secure code, and it may even hinder important skills like reading documentation and debugging.</p><p>My advice? Embrace these tools as companions for learning, refactoring, and enhancing your work, but maintain control over your code by focusing on quality and understanding what you’re building. AI can be a valuable ally-just be sure it complements, rather than replaces, your own development skills.</p><p>For more of my thoughts, check out my other post, <a href="https://www.rafay99.com/blog/mylovehaterelationshipwithcopilot"><em>My Love &amp; Hate Relationship with Copilot</em></a>.</p><p>Until next time, stay curious and keep building 👓.</p><p><em>Originally published at </em><a href="https://www.rafay99.com/blog/embrace_ai_tools/"><em>https://www.rafay99.com</em></a><em> on November 8, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef5ffdc01731" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Forked: A Game-Changer Ahead]]></title>
            <link>https://medium.com/@99marafay/flutter-forked-a-game-changer-ahead-01789624d8c3?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/01789624d8c3</guid>
            <category><![CDATA[fork]]></category>
            <category><![CDATA[flock]]></category>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 19:00:55 GMT</pubDate>
            <atom:updated>2024-11-09T16:20:51.137Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wmf98I7lFfwyCpMUzPDcLg.png" /><figcaption>Flutter fork: Flock</figcaption></figure><p><em>The Flutter Foundation just made waves with its announcement to fork Flutter, and as both a developer and blogger deeply invested in the framework, I wanted to dig into what this means for the community and for the future of cross-platform development.</em></p><p>Flutter, an open-source UI toolkit loved for its ability to create natively compiled applications from a single codebase, has been growing in popularity since its release by Google in 2018. It’s powered countless apps on Android, iOS, the web, and more, and has been embraced by companies big and small. But like any large open-source project, Flutter has experienced some growing pains. That’s where the Flutter Foundation’s recent announcement comes in, and here’s why I think it’s a move worth celebrating-and discussing.</p><h3>Breaking Down the Reasons for Forking Flutter</h3><p>The decision to fork an open-source project isn’t made lightly. It often means there are significant concerns with the direction, governance, or responsiveness of the original project. According to the Foundation’s announcement, the main motivations for this fork center on three key areas: governance, community-driven development, and innovation. Here’s my take on each:</p><ol><li><strong>Decision-Making and Governance</strong><br> In open-source projects, governance affects everything, from prioritizing bug fixes to setting long-term goals. The Flutter Foundation observed that Google’s centralized control over Flutter’s roadmap sometimes led to slower responses on issues and community feedback. They noted a growing discontent among developers who felt sidelined in decision-making, and that’s something I can resonate with as well. By forking Flutter, the Foundation is committing to a more transparent, community-focused governance model where the voices of developers are taken seriously and have an impact on the project’s future direction. This should allow faster, more flexible decision-making and prevent some of the bottlenecks we’ve seen with Flutter’s mainline updates.</li><li><strong>Community-Driven Development</strong><br> The heart of this fork is to create a development model that directly addresses the community’s needs. With the Foundation’s fork, developers should see improvements driven by real-world feedback. They’re emphasizing a more direct feedback loop, where community input will shape everything from feature prioritization to bug fixing. For developers like me, this could be a major boost. Community-driven development has the potential to make Flutter more practical and responsive for day-to-day use, leading to features that address real pain points and improve the developer experience significantly.</li><li><strong>Innovation and Flexibility in Cross-Platform UI</strong><br> Finally, this fork aims to accelerate innovation. Flutter’s biggest appeal is its versatility in building cross-platform applications, but as the Flutter Foundation pointed out, there’s been a lag in addressing feature requests and improving platform integrations. They aim to experiment with new features and enhancements that may have been stalled in Flutter’s main branch. This is an exciting prospect because the Foundation is talking about releasing more experimental features and quicker updates. They seem ready to take risks that may lead to a more dynamic toolkit, and this could mean Flutter will gain capabilities to support more advanced use cases, optimize performance, and improve platform integrations that are lagging.</li></ol><h3>What to Expect from the New Flutter Fork</h3><p>So, what’s in store? Here are some changes the Foundation has outlined, and what I think about them:</p><ul><li><strong>Faster Releases and Bug Fixes</strong><br> One of the biggest promises here is a faster release cadence. With community-driven development at its core, this fork should give us faster updates and more consistent bug fixes. While Google has a long release cycle, this fork aims to be agile, which could mean that common developer complaints and usability issues get resolved sooner rather than later. That’s a big win.</li><li><strong>Better Documentation and Onboarding</strong><br> One criticism that comes up often with Flutter is its documentation, particularly for more complex topics. The Flutter Foundation seems to understand this, and they’re promising a streamlined setup process along with enhanced documentation. This should make the learning curve easier, especially for newcomers, and I’m hopeful that this focus on documentation will help developers at all levels become productive faster.</li><li><strong>Open Governance and Community Insight</strong><br> The new governance model is a game changer. I’m particularly excited about this aspect because it’s an opportunity for the developer community to have a real voice. Transparency in decision-making, with input from the community, could help Flutter evolve in a way that aligns more closely with developer needs.</li></ul><h3>What Does This Mean for the Flutter Community?</h3><p>The potential benefits are clear, but there are a few risks. Forks can sometimes lead to fragmentation within a community. If developers are divided between the original Flutter and the new fork, it could result in duplicate efforts or compatibility issues. However, the Flutter Foundation has assured that compatibility with Google’s Flutter remains a priority, so existing projects shouldn’t face disruptions.</p><p>In fact, if they manage to retain compatibility, this fork could act as a more agile “testing ground” for new features. Developers could experiment with the fork and if the features are successful, those could later be brought into Flutter’s mainline branch. This approach could lead to the best of both worlds: innovation in the fork with stability in the original Flutter.</p><h3>My Hot Take: Why I’m Excited About This Fork</h3><p>Overall, I’m optimistic about the Flutter Foundation’s fork. As a developer, there’s nothing more frustrating than waiting for feature requests to be addressed or bugs to be fixed while seeing little response from the core team. This fork has the potential to make Flutter’s development process faster and more developer-centered, and that’s incredibly promising.</p><p>If the Flutter Foundation pulls this off, we might be looking at a Flutter ecosystem where developers have greater control over the toolkit they rely on. It’s a refreshing vision for what open-source projects can be: driven by community input, transparent, and responsive to real-world use cases.</p><p>In a sense, this fork might just be what Flutter needs to reach its full potential. By accelerating innovation and focusing on the developer experience, the Flutter Foundation is setting a precedent for how large open-source projects can be managed in a way that puts the community first.</p><h3>Final Thoughts</h3><p>The Flutter Foundation’s fork is a significant event for the open-source UI community. It’s a chance for developers to be part of a more responsive, innovative environment and could mean a better, faster Flutter for everyone. I’ll be watching this development closely and am eager to see the community’s response. For now, I’m excited about the possibilities and hopeful that this move will bring about the enhancements we’ve been waiting for.</p><p>As a developer and Flutter enthusiast, I can’t wait to dive into this new version and see where it takes us!</p><p>Until then, peace out, nerds. 👓</p><p>You can checkout the original Blog Post By <a href="https://flutterfoundation.dev/blog/posts/we-are-forking-flutter-this-is-why/">Flock</a></p><p><em>Originally published at </em><a href="https://www.rafay99.com/blog/flutter_fork_flock/"><em>https://www.rafay99.com</em></a><em> on November 1, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01789624d8c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI-Powered Coding: Can Machine Learning Write Better Code than Humans?]]></title>
            <link>https://medium.com/@99marafay/ai-powered-coding-can-machine-learning-write-better-code-than-humans-c24c615b1e12?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c24c615b1e12</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[the-truth]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[codi̇ng]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Mon, 28 Oct 2024 19:00:51 GMT</pubDate>
            <atom:updated>2024-10-29T17:57:12.576Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="AI and Huaman Writing code Together" src="https://cdn-images-1.medium.com/max/1024/1*_QWdzUXILiRGDsYnmEFGBQ.png" /></figure><p>I’m a developer, and with all this AI talk, I started to wonder: Can AI write better code than an experienced programmer? Sales terms and benchmarks show that AI can solve existing problems, but can it truly predict and solve real-life challenges?</p><p>The release of AI chatbots that can generate code is exciting. With millions of users worldwide, it’s amazing to see how quickly the world is changing through this technology. But it raises another question: Can AI write quality, secure code?</p><p>Writing code is one thing; writing code that meets standards and is secure is another. Achieving both in a codebase can be tough.</p><p><em>Can AI really write better code than humans? Moreover, will it replace software engineers?</em></p><p>The short answer, for those reading this blog, is *NO*. AI will not write clean, secure code. If you’re interested, stay with me as we break down why AI isn’t producing good, clean code.</p><h3>Contextual Understanding:</h3><p>The reality of AI is that AI does not have deep Understanding of contenctual insight that human have, which means they may miss the nuances needed for high-quality, clean and secure code.</p><h3>Code Quality &amp; Standards</h3><p>Clean code involves readability, simplicity, and modularity, all of which are influenced by coding practices, style guides, and conventions specific to different languages or projects. While AI can mimic style patterns seen in its training data, it lacks the ability to consistently apply these standards creatively or adaptively, especially in complex, real-world applications.</p><h3>Security Challenges:</h3><p>Writing secure code requires awareness of potential vulnerabilities (like SQL injection, cross-site scripting, etc.) and implementing secure design patterns. AI can learn some secure coding practices from its training data, but it may overlook less common vulnerabilities or fail to adapt to new security threats without retraining.</p><h3>Training Data Limitations:</h3><p>AI models, like large language models, are trained on vast amounts of code, but this data includes both good and bad examples, so AI can inadvertently generate code with vulnerabilities or poor practices. The AI’s “understanding” of code quality is only as good as the examples it has seen.</p><h3>Dynamic Requirements:</h3><p>Real-world coding often involves changing requirements and a collaborative review process, both of which are critical for ensuring clean, secure code. AI lacks the ability to engage in this iterative, human-centric review process, which helps catch errors, optimize, and secure code.</p><p>AI won’t replace programmers. But AI is already helping developers to write code. AI-powered coding assistants like ChatGPT, Github, CoPilot, and OpenAI Codex are accessible tools that help embedded developers write better code faster. AI code generators can now quickly generate high-quality code snippets, identify issues and defects, and suggest improvements to code snippets.</p><p>Of course, it will take time before AI will be able to create actual, production-worthy code that spans more than a few lines.</p><p>Here’s how AI will impact software development in the near future.</p><h3>Generative AI Will Improve</h3><p>It will become effective at automating tasks and helping developers understand their options. And it will then let the human decide how to optimize for circumstances beyond AI’s understanding.</p><h3>AI Will Become a Coding Partner</h3><p>Software developers will use AI as a coding pair to write better software. This is already happening today and will continue to rise in popularity as AI learns to write more than a few lines of code at a time. Developers will include AI pair programming tools within their IDEs. Similar to human paired programming, the AI tool will perform coding tasks based on prompts, and then the developer will review the code. In the past, this process was more labor intensive, but AI tools can perform certain parts of their SDLC faster than a human developer, freeing the developer to focus on more complex tasks.</p><h3>But Programmers Will Remain Important</h3><p>The true value of a programmer is not knowing how to build it. The value is in knowing what to build.</p><p>It will take even longer before AI learns how to interpret the business value of each feature and advise you what to develop first. There will always be a role for the human programmer.</p><h3>What If AI Writes Reliable Code?</h3><p>That’s a big if. Most humans can’t write reliable code. And AI is just an application that analyzes vast amounts of human-written code. So, it’s unlikely that AI will write reliable code.</p><p>Most programmers agree. In a recent survey by <a href="https://codesignal.com/report-developers-and-ai-coding-assistant-trends/">CodeSignal</a>, 1,000 developers worldwide were asked about their use of AI coding assistant tools. While 81% of developers said that they use AI-powered coding assistants, 55% of software engineers surveyed said that they had concerns about the quality of the AI-generated code.</p><p>So, AI isn’t the answer to improving code quality.</p><h3>Role of Human Software Engineers in the Future</h3><p>As the AI wave surges forward, you might wonder about the fate of human software engineers. Fear not, for the future is bright and brimming with possibilities! While ChatGPT is a coding whiz, it still bows to the prowess of human developers in certain domains. The significance of coding goes beyond mere syntax and algorithms; it’s about the art of transforming ideas into functional masterpieces.</p><p>In this tech-powered future, human software engineers will rise as architects of innovation, crafting solutions beyond the scope of AI. They’ll champion creativity, adaptability, and problem-solving, deftly navigating the ever-changing landscape of technology. So, fear not, developers of humankind, for your role in the AI era is secure and vital.</p><h3>Conclusion</h3><p>Here’s the answer you’ve been looking for: No, AI does not write clean and secure code. There are reasons for this, as explained above. However, AI is here to stay, and it’s best to embrace this future. Use AI tools to improve software quality, but don’t rely on them too heavily. Over-dependence on these tools can erode your skills before you realize it. To read more on this, check out my other blog post: <a href="https://www.rafay99.com/blog/mylovehaterelationshipwithcopilot/">My Love &amp; Hate Relationship with Copilot</a>.</p><p><em>Originally published at </em><a href="https://www.rafay99.com/blog/ai-coding-machine-learning/"><em>https://www.rafay99.com</em></a><em> on October 28, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c24c615b1e12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring React: A Full-Stack Developer’s Perspective]]></title>
            <link>https://medium.com/@99marafay/exploring-react-a-full-stack-developers-perspective-69dc4c39d238?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/69dc4c39d238</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[learning-and-development]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Fri, 30 Aug 2024 19:00:14 GMT</pubDate>
            <atom:updated>2024-08-31T08:49:36.340Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ilpHnrX2ykg5pPq1.png" /><figcaption>Thumbnail</figcaption></figure><p>If you don’t know, I’m a full-stack developer who develops Android and web apps for different clients. I wanted to explore more skill sets, so I started learning React. Now, if you’re unfamiliar with React, you must be living under a rock because it’s the biggest and most popular web framework for developing frontend applications. With multiple backend support, you can create a good-looking UI using React with a great developer experience, and it’s all done with JavaScript. What could go wrong, right!?</p><p>Well, I’m here today to share my experience of learning and using React to develop a full-stack application.</p><p>The application I’m developing is called <strong>Shafiq Law Chamber</strong>, and it has two parts:</p><p>In this blog post, I’ll focus on the frontend, and in the next post, I’ll cover integrating the backend with React. So, let’s get started.</p><h3>Creating the Project</h3><p>To create a project in React, there are two ways: use the npx command or use the Vite command.</p><p>To create a project using npx, here is the command:</p><pre>npx create-react-app my-app --template typescript</pre><p>Or you can use Vite to create a React application with TypeScript using this command:</p><pre>npm create vite@latest</pre><p>Both are fine, but I recommend using Vite because it simplifies things.</p><h3>Main Programming Language</h3><p>For this project, I’m using multiple programming languages, primarily TypeScript and JavaScript. We all know React uses JavaScript, or you can opt for TypeScript. For this project, I decided to use TypeScript. When TypeScript was first launched, I wasn’t a fan. But now that I’ve used it, it makes a lot of sense.</p><p>I really like TypeScript, especially for this project. When it comes to configuring TypeScript with React, it was challenging at first, but over time, I’ve come to appreciate it. It’s much better now-one simple command to set up TypeScript, and debugging is easier.</p><h4>Example</h4><p>When I was designing the contact form page and needed to get the values from the form, TypeScript threw an error, saying that I needed to define data types for the variables. That’s when I realized how, in the past with JavaScript, these errors would only show up at runtime. This made a lot of sense to me.</p><p>I use Flutter, which also uses types, and this whole type-matching system fits perfectly for me.</p><h3>Tailwind CSS</h3><p>I love Tailwind CSS. It’s simple to code and makes things fun with inline CSS and default themes in the config file. It’s awesome. Installing Tailwind CSS can be a bit rough, but other than that, it’s easy and good to use. It also takes care of UI for both web and mobile. No need to write separate CSS for mobile-Tailwind handles it.</p><h3>React</h3><p>With everything explained and set up, let’s talk about React. You have to agree there are some pros and cons to using React.</p><h4>Pros:</h4><ul><li>Modular Component Code</li><li>React DOM</li><li>Load pages without reloading the entire site</li><li>Live Development Environment</li></ul><p>These are some of the things I love about React. It’s very much like Flutter-the reusable components can be called again and again when needed. The whole site doesn’t need to be reloaded when moving from one page to another. Running the local server with just one command makes things easier and errors easier to locate.</p><h4>Cons:</h4><p>Here are all the cons I encountered while building this project:</p><p>While building this project, I faced several challenges. Implementing React Hooks was difficult, particularly in managing state and side effects. Adding support for the .env file also presented issues, as configuring environment variables across different setups was tricky. Integrating Firebase was another challenge, from setting up authentication to managing the real-time database. Additionally, working with React Query brought its own complexities in data fetching, caching, and synchronization.</p><h3>Image Optimization</h3><p>On the web, loading images efficiently is crucial. You don’t want users to have a bad experience. In Flutter or any other platform, you can use a package called pre-caching, which I’ve used a lot for loading images into the UI. But in React, I’m still figuring out how to do that.</p><p>To this day, I’m searching for a way to optimize images while ensuring they load quickly and with good quality. If I find a good solution, I’ll let you know in the next blog and video as well.</p><h3>New UI Libraries</h3><p>I come from Flutter, where I mainly use the Material UI library. But I didn’t know that React has a huge set of predefined libraries for the UI, such as MaterialUI, Chakra, and NextUI. These libraries are simple plug-and-play with customization options, and many use Tailwind under the hood, which makes designing the UI much easier.</p><p>If I had known about this earlier, it would have helped me a lot in designing the UI.</p><h3>Conclusion</h3><p>What’s my conclusion for this blog and video? I think React is great. I don’t understand why people dislike it so much. Or maybe I’m not knowledgeable enough yet to make a final judgment. But as of today, using React in this project, I’m loving it. The modular and component-based way of building websites is familiar to me.</p><p>I like React for now, and I’ll let you know more in the future.</p><p>Until then, peace out, nerds. 💕</p><p><em>Originally published at </em><a href="https://rafay99.com/blog/exploring-react-a-full-stack-developers-perspective"><em>https://rafay99.com</em></a><em> on August 30, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69dc4c39d238" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The world of Operating System]]></title>
            <link>https://medium.com/@99marafay/the-world-of-operating-system-88ac5dbc2355?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/88ac5dbc2355</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[operating-systems]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Mon, 06 Mar 2023 10:13:41 GMT</pubDate>
            <atom:updated>2023-03-06T10:13:41.806Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>I was at work and I was doing my work, which was developing applications and making sure that the code that I was writing worked, and I was using Linux to do all my work. In Linux, I use a terminal to write my blogs and code my applications, and when my coworker saw me using a terminal and asked me what was on my screen, I told him it was my terminal that I was using to do my work. He was shocked, so at that time, normal people didn’t know what an operating system was, so that’s the topic for today: what is an operating system? Soon, you will know everything there is to know about operating systems.</p><h3>What is an Operating System?</h3><p>An operating system (OS) is a software program that manages computer hardware and software resources and provides services to computer programs. It acts as an intermediary between computer applications and the computer hardware, providing an interface for software to interact with the hardware. The operating system controls the allocation of resources such as memory, processing power, and storage, and ensures that these resources are used efficiently and effectively. In this blog, we will explore the basics of operating systems and their importance in the modern computing world.</p><h3>Types of Operating Systems:</h3><p>There are several types of operating systems, each with its own strengths and weaknesses. The three most common types of operating systems are:</p><ol><li>Desktop Operating Systems: These operating systems are designed for personal computers and are used by individuals for their day-to-day computing needs. Examples of desktop operating systems include Microsoft Windows, macOS, and Linux.</li><li>Mobile Operating Systems: These operating systems are designed for mobile devices such as smartphones and tablets. Examples of mobile operating systems include Android and iOS.</li><li>Server Operating Systems: These operating systems are designed to manage and operate servers, which are used to store and manage data and run applications for large organizations. Examples of server operating systems include Windows Server and Linux Server.</li></ol><h3>Components of an Operating System:</h3><p>An operating system consists of several components, including:</p><ol><li>Kernel: The kernel is the core component of the operating system and manages the system’s resources, including memory, processing power, and storage.</li><li>User Interface: The user interface is the part of the operating system that allows users to interact with the computer. The user interface can take different forms, including a command-line interface, a graphical user interface (GUI), or a touch-based interface.</li><li>Device Drivers: Device drivers are software programs that allow the operating system to communicate with hardware devices such as printers, scanners, and cameras.</li><li>System Libraries: System libraries are collections of software programs that provide commonly used functionality, such as input/output (I/O) operations, networking, and file management.</li><li>Utility Programs: Utility programs are software programs that perform specific tasks, such as disk cleanup, antivirus scanning, and system maintenance.</li></ol><h3>Importance of Operating Systems:</h3><p>Operating systems are an essential part of modern computing. They provide a platform for software developers to create and distribute their applications, and they ensure that the computer’s hardware is used efficiently and effectively. Without an operating system, users would need to interact with the hardware directly, which would be cumbersome and time-consuming.</p><p>Operating systems also provide a layer of security, protecting users from malware and other security threats. They allow for multiple users to share a single computer, and they enable networking, which allows users to share resources and communicate with other computers.</p><h3>Conclusion:</h3><p>Operating systems are an essential part of modern computing, providing a platform for software development, managing computer resources, and providing security and networking capabilities. There are several types of operating systems, each with its own strengths and weaknesses. Understanding operating systems and their components is essential for anyone who wants to work with computers, whether as a user or a developer.</p><p>I hope with this blog you will understand what an OS is, and with that, we will see you next time. ❤️</p><h3>Thumbnail:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5RW1KTfRFyopoIXk.png" /><figcaption>Operating System</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88ac5dbc2355" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Benefits of Mindfulness Meditation]]></title>
            <link>https://medium.com/@99marafay/the-benefits-of-mindfulness-meditation-b14729a96175?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b14729a96175</guid>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[relax]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[enjoy]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Mon, 27 Feb 2023 06:57:06 GMT</pubDate>
            <atom:updated>2023-02-27T06:57:06.716Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*JNxy4ZyahPAf0DR4.png" /></figure><p>In today’s fast-paced world, it can be challenging to find a moment of peace and quiet. We’re constantly bombarded with notifications, emails, and messages, making it difficult to focus on the present moment. However, mindfulness meditation offers a way to cultivate inner peace and improve your overall well-being. In this article, we’ll explore the benefits of mindfulness meditation and why you should make it a daily practice.</p><h3>Reduces Stress and Anxiety</h3><p>Mindfulness meditation has been shown to reduce stress and anxiety levels. Practicing mindfulness helps you become more aware of your thoughts and feelings and learn to observe them without judgment. This practice helps you develop a more compassionate attitude towards yourself and others, reducing your overall stress levels.</p><h3>Improves Focus and Concentration</h3><p>Another benefit of mindfulness meditation is that it improves your ability to focus and concentrate. Mindfulness helps you train your mind to stay present and focused on the task at hand. As a result, you become more productive and efficient in your daily life.</p><h3>Boosts Immune System</h3><p>Research has shown that regular mindfulness meditation can boost your immune system’s functioning. By reducing stress and anxiety levels, you help support your body’s natural defense mechanisms. This practice helps keep you healthier and more resilient.</p><h3>Enhances Emotional Well-being</h3><p>Mindfulness meditation helps you develop a more positive outlook on life. Practicing mindfulness allows you to become more aware of your thoughts and feelings, helping you better regulate your emotions. This practice can help reduce symptoms of depression and anxiety and improve overall emotional well-being.</p><p>Many people struggle with getting a good night’s sleep. Mindfulness meditation has been shown to help improve sleep quality and reduce insomnia. This practice helps calm your mind and relax your body, making it easier to fall asleep and stay asleep.</p><h3>Conclusion:</h3><p>Mindfulness meditation offers many benefits for our physical, emotional, and mental well-being. By making it a daily practice, you can reduce stress and anxiety levels, improve focus and concentration, boost your immune system, enhance emotional well-being, and promote better sleep. So, why not give it a try and see the positive impact it can have on your life?</p><p>I will see you next time❤️.</p><h3>Credit</h3><p>This article was written by <a href="https://rafay99.info/">Abdul Rafay</a> and published on <a href="https://futureinsight.blog/">Future Insight</a>.</p><p>If you have any questions, please contact</p><h3>Future Insight:</h3><p>Email: futurenisightblog@gmail.com</p><h3>Author:</h3><ul><li>Abdul Rafay</li><li>Email: 99marafay@gmail.com</li></ul><p><em>Originally published at </em><a href="https://future-insight.blog/Benefits-of-Mindfulness-Meditation/"><em>https://future-insight.blog</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b14729a96175" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[False Data Injection Attack]]></title>
            <link>https://medium.com/@99marafay/false-data-injection-attack-314da3d8bc85?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/314da3d8bc85</guid>
            <category><![CDATA[articles]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-protection]]></category>
            <category><![CDATA[blog]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Tue, 14 Feb 2023 09:15:49 GMT</pubDate>
            <atom:updated>2023-02-14T09:15:49.428Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>False data injection is a type of cyber attack that occurs when an attacker alters or introduces incorrect data into a control system or its communication network. This type of attack can have serious consequences for the operation of the control system, such as loss of control, equipment damage, and even safety incidents.</p><p>False data injection attacks can take many forms, including modifying sensor readings, injecting false control commands, or altering historical data records. These attacks can be carried out by insiders or outsiders with various motives, ranging from theft and sabotage to espionage and cyber warfare.</p><h3>Type of False Data Injection Attacks:</h3><h4>Type 01:</h4><p>One common type of false data injection attack is the manipulation of sensor readings. This type of attack can be carried out by altering the readings of sensors used in control systems to measure physical parameters, such as temperature, pressure, and flow rate. By introducing false readings into the control system, the attacker can cause the system to make incorrect decisions, leading to improper operation and potentially dangerous conditions.</p><h4>Type 02:</h4><p>Another type of false data injection attack is the injection of false control commands. This type of attack occurs when an attacker sends false control signals to actuators or other control elements in the system, causing them to perform unintended actions. This type of attack can be particularly dangerous in safety-critical systems, such as nuclear power plants and aerospace systems, where incorrect control commands can result in equipment damage or even loss of life.</p><p>False data injection attacks can also be used to alter historical data records, such as logs and audit trails, to hide evidence of an attack or conceal the attacker’s activities. This type of attack can make it difficult for system administrators to detect the attack and identify the attacker, increasing the risk of future attacks.</p><h3>Protection Against False Data Injection Attack:</h3><p>To protect against false data injection attacks, it is important to implement a robust cyber security strategy that includes measures such as access control, encryption, and data validation. Access control measures, such as user authentication and authorization, can help prevent unauthorized access to control systems and their communication networks. Encryption can help protect sensitive data from unauthorized access and manipulation, while data validation procedures can help detect false data and prevent it from affecting the operation of the control system.</p><h3>Conclusion:</h3><p>In conclusion, false data injection is a serious type of cyber attack that can have significant consequences for control systems and the safety and security of critical infrastructure. It is important for organizations to implement comprehensive cyber security measures to prevent and detect false data injection attacks, and to respond quickly and effectively in the event of an attack.</p><p>If you have any questions, please contact me through</p><ul><li><a href="/service/mailto:99marafay@gmail.com">Email</a></li><li><a href="https://rafay99.info/">My website</a></li><li><a href="https://rafayblogs.tech/FDIA/github.com/rafay99-epic">Github</a></li></ul><p>I will see you next time❤️.</p><h3>Articles references:</h3><ol><li><a href="https://crashtest-security.com/false-data-injection-attack/">https://crashtest-security.com/false-data-injection-attack/</a></li></ol><h3>GitHub Repository:</h3><ol><li><a href="https://github.com/wsyCUHK/WSYCUHK_FDIA">https://github.com/wsyCUHK/WSYCUHK_FDIA</a></li><li><a href="https://github.com/dependable-cps/FDIA-PdM">https://github.com/dependable-cps/FDIA-PdM</a></li><li><a href="https://github.com/urwithajit9/FDIA-classification">https://github.com/urwithajit9/FDIA-classification</a></li></ol><h3>Cover Picture:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kd-0bPkCgCEyCHAy.png" /></figure><p><strong><em>Originally published at </em></strong><a href="https://rafayblogs.tech/FDIA/"><strong><em>https://rafayblogs.tech</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=314da3d8bc85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Your Own Model]]></title>
            <link>https://medium.com/@99marafay/creating-your-own-model-8d729d4f63b6?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d729d4f63b6</guid>
            <category><![CDATA[training]]></category>
            <category><![CDATA[model]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 21:21:50 GMT</pubDate>
            <atom:updated>2023-02-07T21:21:50.178Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine learning is an exciting field that has revolutionized the way we approach problem-solving. By using algorithms that can learn from data and make predictions, machine learning models have become essential tools for solving complex problems across a variety of industries. In this blog, we’ll walk through the basics of designing a machine learning model from scratch.</p><p>Follow these steps to get a better understanding of how machine learning models are created.</p><h3>Step 1: Define the Problem and Identify the Data</h3><p>The first step in designing a machine learning model is to clearly define the problem you are trying to solve. This could be anything from predicting the stock price of a company to identifying whether an email is spam or not. Once you have a clear definition of the problem, you need to identify the data that will be used to train your model. This could be data you have collected yourself or data that is publicly available.</p><h3>Step 2: Prepare the Data</h3><p>Once you have identified your data, the next step is to prepare it for use in your machine learning model. This includes cleaning the data, filling in any missing values, and transforming the data into a format that can be used by the machine learning algorithm. It’s also important to split the data into training and testing sets to ensure that the model has been trained on enough data and can be tested for accuracy.</p><h3>Step 3: Choose a Machine Learning Algorithm</h3><p>There are many different machine learning algorithms to choose from, and each has its own strengths and weaknesses. The algorithm you choose will depend on the nature of your problem and the type of data you are working with. Some popular algorithms include decision trees, k-nearest neighbors, and artificial neural networks.</p><h3>Step 4: Train the Model</h3><p>Once you have prepared the data and chosen your algorithm, the next step is to train the model. This involves feeding the algorithm the training data and allowing it to “learn” from the data. The algorithm will then use this knowledge to make predictions about the test data.</p><h3>Step 5: Evaluate the Model</h3><p>Once the model has been trained, it’s important to evaluate its performance to ensure that it’s accurate. This is done by comparing the predictions made by the model with the actual values in the test data. Common evaluation metrics include accuracy, precision, and recall.</p><h3>Step 6: Refine the Model</h3><p>If the performance of the model is not satisfactory, it may be necessary to refine the model by adjusting its parameters or trying a different algorithm. This process may need to be repeated several times to achieve the desired level of accuracy.</p><p>In conclusion, designing a machine learning model requires careful consideration of the problem you are trying to solve, the data you have available, and the machine learning algorithm that will be used. By following these steps and continually refining the model, you can build a machine learning model that accurately predicts outcomes and helps you make better decisions.</p><p>If you have question then free will to <a href="/service/mailto:99marafay@gmail.com">email me</a> or Contact me through my <a href="https://rafayblogs.tech/post/machine-learning/designing-a-machine-learning-model-a-guide-for-beginners/rafay99.info">website</a>.</p><p>see you next time❤️.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-ZdY80zBJ8KoNqbg.png" /></figure><p><em>Originally published at </em><a href="https://rafayblogs.tech/post/machine-learning/designing-a-machine-learning-model-a-guide-for-beginners/"><em>https://rafayblogs.tech</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d729d4f63b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Resources for Learning Machine Learning & Deep Learning]]></title>
            <link>https://medium.com/@99marafay/best-resources-for-learning-machine-learning-deep-learning-a120c63e747e?source=rss-c4e6e8cbe6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a120c63e747e</guid>
            <category><![CDATA[resources]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[use-these-resources]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Abdul Rafay]]></dc:creator>
            <pubDate>Sun, 29 Jan 2023 16:46:34 GMT</pubDate>
            <atom:updated>2023-01-29T16:46:34.136Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>Machine Learning and Deep Learning are rapidly growing fields that are changing the way we interact with technology. These fields have the power to create intelligent systems that can learn from data and make predictions, decisions, and even create new knowledge. If you’re interested in learning about Machine Learning and Deep Learning, there are many resources available to help you get started.</p><figure><img alt="Resources that Matter" src="https://cdn-images-1.medium.com/max/1024/1*13is2nEv171DWxArYwJUCw.png" /></figure><h3><strong>Best Resources</strong></h3><p>As I was learning Machine Learning and Deep Learning, I got to the point where I did not understand the basic knowledge of Machine Learning Models and Deep Learning Models. So I decided to start over again, and I used these resources to get things started. I am still learning, and every day is a new learning challenge, so use these resources to hone your skills.</p><h4><strong>Coursera</strong></h4><p>Coursera is one of the most popular online learning platforms, and it offers a wide range of Machine Learning and Deep Learning courses. Some of the most popular courses include Andrew Ng’s Machine Learning course, which is widely considered to be the “gold standard” in Machine Learning education, and deeplearning.ai, a series of five Deep Learning courses taught by Andrew Ng.</p><h4><strong>edX</strong></h4><p>edX is another popular online learning platform that offers a wide range of Machine Learning and Deep Learning courses. Some of the most popular courses include MIT’s Introduction to Deep Learning and IBM’s Applied AI Professional Certificate.</p><h4><strong>Udacity</strong></h4><p>Udacity offers a range of Machine Learning and Deep Learning courses, including the popular Machine Learning Engineer Nanodegree and Deep Learning Nanodegree programs.</p><h4><strong>DataCamp</strong></h4><p>DataCamp is an online learning platform that focuses on data science and Machine Learning. It offers a wide range of Machine Learning and Deep Learning courses, including the popular Machine Learning in Python and Deep Learning in Python courses.</p><h4><strong>Kaggle</strong></h4><p>Kaggle is a platform for data science and Machine Learning competitions. It offers a wide range of tutorials and resources for learning about Machine Learning and Deep Learning, as well as the opportunity to apply your skills by participating in competitions.</p><h4><strong>Books</strong></h4><p>There are numerous books available that cover the subject of Machine Learning and Deep Learning. Some popular titles include “Deep Learning” by Yoshua Bengio, Ian Goodfellow, and Aaron Courville, “Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow” by Aurélien Géron, and “Pattern Recognition and Machine Learning” by Christopher M. Bishop.</p><h4><strong>Conferences and Meetups</strong></h4><p>Attending conferences and meetups is a great way to learn about the latest developments in Machine Learning and Deep Learning, as well as to network with other people in the field. Some popular conferences include NeurIPS, ICML, and ICLR.</p><h3><strong>Conclusion</strong></h3><p>In conclusion, learning Machine Learning and Deep Learning can be a challenging, but rewarding journey. With the right resources and a willingness to learn, anyone can become proficient in these fields. Whether you’re interested in a career as a data scientist, machine learning engineer, or research scientist, the above resources can help you get started on your journey to becoming an expert.</p><p>So let me know your thoughts, and if there are some awesome resources, then share them with me through [email](mailto:99marafay@gmail.com).</p><h3><strong>Contact Me:</strong></h3><p>If you have any questions, please contact me [Email](mailto:99marafay@gmail.com), [My website](https://rafay99.info), [Github](github.com/rafay99-epic) and I will see you next time❤️.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a120c63e747e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>