<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Omar Naguib</title>
    <description>The latest articles on DEV Community by Omar Naguib (@omarnaguib).</description>
    <link>https://dev.to/omarnaguib</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1192554%2Fe90f6dfb-c356-4c90-8df4-74a0e8e80230.jpeg</url>
      <title>DEV Community: Omar Naguib</title>
      <link>https://dev.to/omarnaguib</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omarnaguib"/>
    <language>en</language>
    <item>
      <title>Share markdown: Vibe coding a tweet</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Fri, 09 May 2025 16:53:42 +0000</pubDate>
      <link>https://dev.to/omarnaguib/share-markdown-vibe-coding-a-tweet-3l38</link>
      <guid>https://dev.to/omarnaguib/share-markdown-vibe-coding-a-tweet-3l38</guid>
      <description>&lt;p&gt;I was scrolling through twitter when i saw this post, mentioning how there wasn't a simple tool where you can easily share and edit markdown that is embedded in the url&lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1920516917179146691-578" src="https://platform.twitter.com/embed/Tweet.html?id=1920516917179146691"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1920516917179146691-578');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1920516917179146691&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;This was the perfect project that the current tooling of AI agents is making really accessible and simple.&lt;br&gt;
I was able to quickly develop it within the day, get the first users and feedback, and get a Pull Request from another developer.&lt;/p&gt;

&lt;p&gt;I also learned a new tip.. There is a way to add URL query parameters that don't get sent to the server, that is by using hash parameters. This is an incredibly easy solution to the problem of embedding information when you don't want to involve a server.&lt;/p&gt;

&lt;p&gt;Wanna see how that looks? check out the project &lt;a href="https://share-markdown.vercel.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Thu, 08 May 2025 16:38:40 +0000</pubDate>
      <link>https://dev.to/omarnaguib/-3o4k</link>
      <guid>https://dev.to/omarnaguib/-3o4k</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/omarnaguib/tool-translation-the-joy-of-efficient-software-5ec8" class="crayons-story__hidden-navigation-link"&gt;Tool translation: the joy of efficient software&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/omarnaguib" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1192554%2Fe90f6dfb-c356-4c90-8df4-74a0e8e80230.jpeg" alt="omarnaguib profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/omarnaguib" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Omar Naguib
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Omar Naguib
                
              
              &lt;div id="story-author-preview-content-2427416" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/omarnaguib" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1192554%2Fe90f6dfb-c356-4c90-8df4-74a0e8e80230.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Omar Naguib&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/omarnaguib/tool-translation-the-joy-of-efficient-software-5ec8" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Apr 23 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/omarnaguib/tool-translation-the-joy-of-efficient-software-5ec8" id="article-link-2427416"&gt;
          Tool translation: the joy of efficient software
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/productivity"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;productivity&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/softwaredevelopment"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;softwaredevelopment&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/omarnaguib/tool-translation-the-joy-of-efficient-software-5ec8#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>programming</category>
      <category>productivity</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>My intuition about programmer replacement theory</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Wed, 23 Apr 2025 23:45:23 +0000</pubDate>
      <link>https://dev.to/omarnaguib/my-basic-intuition-about-programmer-replacement-theory-2abf</link>
      <guid>https://dev.to/omarnaguib/my-basic-intuition-about-programmer-replacement-theory-2abf</guid>
      <description>&lt;p&gt;Software got an upgrade, it seemingly acquired the ability to think.&lt;/p&gt;

&lt;p&gt;people's reaction: software engineering will vanish, &lt;a href="https://www.businessinsider.com/anthropic-ceo-ai-90-percent-code-3-to-6-months-2025-3#:~:text=Dario%20Amodei%2C%20the%20CEO%20and,impact%20%22in%20every%20industry.%22" rel="noopener noreferrer"&gt;AI will write everything&lt;/a&gt;, &lt;a href="https://x.com/amasad/status/1905103640089825788" rel="noopener noreferrer"&gt;people should no longer learn to code&lt;/a&gt;...etc.&lt;/p&gt;

&lt;p&gt;I don't think this is a serious discussion, and it's totally missing the subject in a major way.&lt;br&gt;
Software is now more useful, it can do more, better and faster. why would software engineering be the first profession to go?&lt;/p&gt;

&lt;p&gt;To the contrary, I think these are great times. we should double down on our craft and embrace it at least as much as we did before.&lt;/p&gt;

&lt;p&gt;I don't think people are being replaced, not the excellent or the just okay ones, not the systems programmers or the product oriented ones, not the T-shaped, B-shaped or O-shaped.&lt;/p&gt;

&lt;p&gt;So you know?.. be happy or whatever..&lt;br&gt;
And tell me.. Aren't you glad this wasn't another one of those "AI won't replace programmers but a programmer using AI will" posts?&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
    <item>
      <title>Insights Workbench: LLMs meet social media</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Wed, 23 Apr 2025 15:09:45 +0000</pubDate>
      <link>https://dev.to/omarnaguib/insights-workbench-llms-meet-social-media-p04</link>
      <guid>https://dev.to/omarnaguib/insights-workbench-llms-meet-social-media-p04</guid>
      <description>&lt;p&gt;With the advancements in in GenAI, as someone who works on a social media product, LLMs felt like they were calling to me.&lt;/p&gt;

&lt;p&gt;We had already set out to build some feature involving LLMs, like trendline analysis, &lt;a href="https://dev.to/omarnaguib/spike-detection-using-simple-algorithms-to-pinpoint-analysis-idj"&gt;spike analysis&lt;/a&gt;, and topic clustering.&lt;/p&gt;

&lt;p&gt;But i felt there was a calling towards something that was more bespoke, the user is combing through a huge amount of data with a question in mind, or even trying to find a question to ask, how can i help him with that.&lt;/p&gt;

&lt;p&gt;The requirements were that it shouldn't be just a &lt;a href="https://www.linkedin.com/posts/rashwan7_a-rant-about-how-businesses-are-adopting-activity-7300062055552675841-OL8i?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAACsPX1wB01Zwhds8qRqh0VozBUyHugvPMaM" rel="noopener noreferrer"&gt;generic chatbot &lt;/a&gt;interface that isn't capable of showing the user the full context of the analysis, it needed to be very specific to the type of analysis we have.&lt;/p&gt;

&lt;p&gt;We also though of building a full on Reporting Agent, capable of building reports on it's own, but the question remained: what are the basic components that that this agent will use to generate these insights, what are the tools that'll make him able to ask questions and craft them into a coherent story to tell.&lt;/p&gt;

&lt;p&gt;I went ahead and built the Insights Workbench, my first iteration on an answer to this question, here are the basic functionalities it can do for you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get you all data that is relevant to you question (Yes, relevant not just similar).&lt;/li&gt;
&lt;li&gt;Discover how data breaks down in relation to some criteria (e.g. attitudes in AI).&lt;/li&gt;
&lt;li&gt;Classify your data into distinct classes.&lt;/li&gt;
&lt;li&gt;Make an analysis based on a free text question.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While initially developed as an internal tool to iterate on, we were able to imagine it as real integrated feature inside the app, which is now under the works.&lt;/p&gt;

&lt;p&gt;The code is publicly available for now and you can check it out &lt;a href="https://github.com/OmarNaguib/WORKBENCH" rel="noopener noreferrer"&gt;here&lt;/a&gt;, you can test on your own data provided it matches the schema.&lt;/p&gt;

&lt;p&gt;Best of luck!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>socialmedia</category>
      <category>llm</category>
    </item>
    <item>
      <title>Spike detection: using simple algorithms to pinpoint analysis</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Wed, 23 Apr 2025 15:09:12 +0000</pubDate>
      <link>https://dev.to/omarnaguib/spike-detection-using-simple-algorithms-to-pinpoint-analysis-idj</link>
      <guid>https://dev.to/omarnaguib/spike-detection-using-simple-algorithms-to-pinpoint-analysis-idj</guid>
      <description>&lt;p&gt;Users look at their performance monitoring dashboards and see this:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpq6rq0sqabiqh16q4ig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpq6rq0sqabiqh16q4ig.png" alt="Image description" width="800" height="423"&gt;&lt;/a&gt;&lt;br&gt;
They can view the numbers and possibly inspect them to see the raw data of any point they choose, but it's really a lot of work. first off, it isn't clear where to look, and secondly, do they have to comb through every comments availiable in the raw data to manage to get some insight?&lt;/p&gt;

&lt;p&gt;With AI, this should be changing, which is why we introduced a feature called spike detection and analysis&lt;/p&gt;

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

&lt;p&gt;The point here is that we would pinpoint specific time intervals that we think had an interesting spike in some metric, and then we would be able to understand more about why it happened.&lt;/p&gt;

&lt;p&gt;The issue was.. we had no idea how to detect those spikes, and who should do it?&lt;br&gt;
AI team, full stack devs, data engineers?&lt;br&gt;
And what would we even look at to determine if something is a spike or if it's interesting enough that we can get insights out of it.&lt;/p&gt;

&lt;p&gt;This is where this demo comes in:&lt;/p&gt;

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

&lt;h5&gt;
  
  
  &lt;a href="https://spike-detection.vercel.app/" rel="noopener noreferrer"&gt;a live preview is available here&lt;/a&gt;
&lt;/h5&gt;

&lt;p&gt;First off to answer the question of what do we deem as interesting, here are the decisions I came to,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Our focus is visual, what the user sees as interesting is the same thing we should present an indication over for users to click.&lt;/li&gt;
&lt;li&gt;We should focus only on increases, since in the social media domain, sudden increases in engagement or most other metrics would mean that is less data to process and less insights to look into.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  the methods
&lt;/h1&gt;

&lt;p&gt;Let me explain a couple of terms i will later use&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;chart height: chart height is the is the distance from the heights point that the user can see to the lowest.&lt;/li&gt;
&lt;li&gt;Maxima: maxima is another words for peaks, it means a point where both the points before and after it are lesser than it in magnitude&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Those 2 concepts led me to the main 2 methods of spike detection&lt;/p&gt;

&lt;h4&gt;
  
  
  #1: Maxima
&lt;/h4&gt;

&lt;p&gt;Global maximum, local maxima, and percentage of local maxima&lt;/p&gt;

&lt;h4&gt;
  
  
  #2: delta/max threshold
&lt;/h4&gt;

&lt;p&gt;Picking spikes based on their delta to the previous point passes a certain threshold.&lt;br&gt;
The methods are: delta/max, delta/max with look forward and delta forward with dual thresholds.&lt;/p&gt;

&lt;p&gt;The demo provides all these methods with their variations and some hyperparameters you can tweak, and we used this demo to engage the stakeholders and decide which one to pick and with what parameter.&lt;br&gt;
You can pick multiple series of real data or artificial function to see how each algorithm performs on different data.&lt;/p&gt;

&lt;h4&gt;
  
  
  Check it out and &lt;a href="https://www.menti.com/aldwwp7y24bn" rel="noopener noreferrer"&gt;Vote here for the algorithm you think is best&lt;/a&gt;.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://spike-detection.vercel.app/" rel="noopener noreferrer"&gt;Link to demo webiste&lt;/a&gt;
&lt;/h4&gt;

</description>
      <category>algorithms</category>
      <category>programming</category>
      <category>datascience</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Tool translation: the joy of efficient software</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Wed, 23 Apr 2025 15:09:04 +0000</pubDate>
      <link>https://dev.to/omarnaguib/tool-translation-the-joy-of-efficient-software-5ec8</link>
      <guid>https://dev.to/omarnaguib/tool-translation-the-joy-of-efficient-software-5ec8</guid>
      <description>&lt;p&gt;A few months back, we got the task of adding Arabic language support into &lt;a href="https://www.eaimtechnologies.com/" rel="noopener noreferrer"&gt;our social media listening tool&lt;/a&gt;, which was a hefty challenge, in addition to the part you write how the logic for translation works (we didn't use a localization library), you also have to make sure that logic is applied to all corners of the application.&lt;/p&gt;

&lt;p&gt;This involved three main parties, the developer; who had to apply the logic, the QA engineer; who had to ensure that logic is applied correctly and evenly everywhere it was valid, and the content team; who had to write the translated content for all text found in the tool.&lt;/p&gt;

&lt;p&gt;Here is the initial workflow, content team went ahead and extracted the text from the tool, managing to extract 600+ pieces of text, and began working on translating them in a google sheet.&lt;/p&gt;

&lt;p&gt;I would then build an easy way for them to update our database with their translations.&lt;/p&gt;

&lt;p&gt;Now QA had to verify 2 things for every piece of text:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;developer has applied translation logic to that text&lt;/li&gt;
&lt;li&gt;content team has that piece of text translated&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can imagine how quickly this can turn into an agonizing pit of inefficient communication..&lt;/p&gt;

&lt;h3&gt;
  
  
  so what's the solution
&lt;/h3&gt;

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

&lt;p&gt;Developers should already apply the translation logic  to every text in the tool using a &lt;code&gt;t&lt;/code&gt; function, every time this function is called it tries to find some text in the dictionary, and return the result if found (and the original if not)&lt;/p&gt;

&lt;p&gt;This means we could already extracted all untranslated text without the need for manual scanning.&lt;/p&gt;

&lt;p&gt;This way of automated scanning managed to get 7000+ pieces of text, more than 1000% increase compared to the originally manually extracted number.&lt;/p&gt;

&lt;p&gt;Along with adding visual indicators to help QA determine why some text is untranslated, providing an webhook that runs with every edit of the translation sheet, that automatically updates the database, we estimate these enhancements to have saved at least 70% of QA time and a huge amount needless communication.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>From PDFMonkey to Aim Monkey: Building internal tools that actually help</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Tue, 22 Apr 2025 15:58:12 +0000</pubDate>
      <link>https://dev.to/omarnaguib/from-pdfmonkey-to-aim-monkey-building-internal-tools-that-actually-help-7</link>
      <guid>https://dev.to/omarnaguib/from-pdfmonkey-to-aim-monkey-building-internal-tools-that-actually-help-7</guid>
      <description>&lt;p&gt;One of the first features i worked on when starting my career was &lt;a href="//aimtechnologies.co"&gt;AIM's&lt;/a&gt; pdf generation tool. It was time to migrate off of &lt;a href="https://pdfmonkey.io/" rel="noopener noreferrer"&gt;PDF monkey's&lt;/a&gt; SaaS product to our own solution. we had to figure a way of maintaining the same templates we used with PDF moneky but reverse engineering the server side logic, this was quite the challenge on it's own, we managed to eventually do it but ended up with a extra friction and huge loss of productivity.&lt;/p&gt;

&lt;h1&gt;
  
  
  The downgrade
&lt;/h1&gt;

&lt;p&gt;PDF monkey offered a developer portal, where you could have a side by side view of the template code you were working on, and a preview of the pdf on the other side.&lt;/p&gt;

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

&lt;p&gt;It had it's own cons (long waiting time, frequent errors, etc..), nevertheless losing it was a huge blow do developer productivity.&lt;/p&gt;

&lt;p&gt;Now there was no way quick way to preview the results of your template code as you wrote it, the only apparent way running the manually every time.&lt;/p&gt;

&lt;p&gt;There were also no history of reports generated were you could quickly get test data from.&lt;/p&gt;

&lt;p&gt;Developers need a tool where they could develop, test, iterate, commit. all things that were provided by PDF monkey&lt;/p&gt;

&lt;h1&gt;
  
  
  If it exists, it's doable
&lt;/h1&gt;

&lt;p&gt;After successfully replacing the functionality of being able to generate pdfs from liquid templates, I was confident i could replace the great DX experience they offered was an even better one, here is how i did it.&lt;/p&gt;

&lt;h1&gt;
  
  
  The challenging components
&lt;/h1&gt;

&lt;h2&gt;
  
  
  In the backend
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;To generate a pdf, we first combine report data with the liquid template code, generating an html page. Which we then transform into a PDF  using a headless browser with puppeteer.&lt;/li&gt;
&lt;li&gt;Templates are just text files which we can edit and read with node's file system operations.&lt;/li&gt;
&lt;li&gt;Allowing the result to be returned as either html or pdf, Will allow switching between quick previews or final (but slower) previews.
## In the frontend&lt;/li&gt;
&lt;li&gt;We need a text editor, thankfully there are lots of available open source editors that can be used in the web, of those i picked the ACE editor.&lt;/li&gt;
&lt;li&gt;Displaying the html preview could be simply done with an , simple and quick without any need for packages.&lt;/li&gt;
&lt;li&gt;Displaying PDFs could be done with react-pdf, a wrapper around Mozilla's pdf.js, a pdf viewer for the browser.
# And here is how it came together&lt;/li&gt;
&lt;/ol&gt;

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

&lt;h2&gt;
  
  
  The benefits
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;I got to do it!&lt;/li&gt;
&lt;li&gt;Way faster previews 30s -&amp;gt; 200ms, that's 150x, Lots of time and frustration saved with better DX.&lt;/li&gt;
&lt;li&gt;Eliminated quotas imposed by the previous SaaS, and prevented timeout issues, both previously out of our control.&lt;/li&gt;
&lt;li&gt;Saved some money.&lt;/li&gt;
&lt;li&gt;The ability to run this app locally, allowed us to introduce version control, being able to easily commit, revert and use git to our benefit.&lt;/li&gt;
&lt;li&gt;This experience led to ideas that greatly helped the occurrence of user reported issues. (we made decision that reversed some of our tech debt).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Finally
&lt;/h2&gt;

&lt;p&gt;We managed to make this migration into something that fit us better, and lead to better decisions and use of our time.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Aria DevTools to improve accessibility</title>
      <dc:creator>Omar Naguib</dc:creator>
      <pubDate>Wed, 25 Oct 2023 07:49:48 +0000</pubDate>
      <link>https://dev.to/omarnaguib/using-aria-devtools-to-improve-accessibility-46o1</link>
      <guid>https://dev.to/omarnaguib/using-aria-devtools-to-improve-accessibility-46o1</guid>
      <description>&lt;p&gt;Accessibility involves putting yourself in others' shoes. You might be surprised that this is a challenging endeavor.&lt;/p&gt;

&lt;p&gt;Luckily, there are tools out there that help us get closer to understanding how people with disabilities can use the web. &lt;a href="https://chrome.google.com/webstore/detail/aria-devtools/dneemiigcbbgbdjlcdjjnianlikimpck" rel="noopener noreferrer"&gt;ARIA DevTools&lt;/a&gt; is one of them, It compiles a visual representation of the website that brings a new perspective and helps you build more accessible website.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;With ARIA DevTools you see your website the way screen readers present it to the blind users. All page elements are presented according to their explicit or implied ARIA roles.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is a representation of the MDN website that showcases beautifully accessible Markup.&lt;/p&gt;

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

&lt;p&gt;In this article I will share my experience with ARIA DevTools and how used it to make &lt;a href="https://omarnaguib.vercel.app/" rel="noopener noreferrer"&gt;my website &lt;/a&gt;better.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using ARIA DevTools
&lt;/h2&gt;

&lt;p&gt;When I first learned of this extension, I was my website was going to look good in them and was eager to test it.&lt;br&gt;
After all, i knew about semantic HTML and i always wrote alt text.&lt;/p&gt;

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

&lt;p&gt;To my disappointment, this is how it looked:&lt;/p&gt;

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

&lt;p&gt;Apparently, there was some work to do. I wanted my website too look more like MDN's.&lt;/p&gt;
&lt;h2&gt;
  
  
  Making improvements
&lt;/h2&gt;

&lt;p&gt;A question that popped in my mind was, "Can I even do this? or this an incredible feat that only experienced developers can do?"&lt;/p&gt;

&lt;p&gt;what did my markup need so it can look good and have a clear nested architecture?&lt;/p&gt;

&lt;p&gt;Using ARIA DevTools made the needed improvement much more clearer, with further analysis i realized the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;my projects should be wrote as a list, this makes for much better semantics.&lt;/li&gt;
&lt;li&gt;for an element to be recognized with that blue color it needed 2 things:

&lt;ol&gt;
&lt;li&gt;be a semantic html tag (header, section, article ..etc).&lt;/li&gt;
&lt;li&gt;have an aria-label.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;I noticed some alt text that was incorrect or that needed to be more descreptive.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a simplified version of some of the changes; it went from this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"projects"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"project"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            Project content
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to this*:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"section-label"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"projects"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"display: contents;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"project"&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"project-label"&lt;/span&gt; &lt;span class="na"&gt;aria-description=&lt;/span&gt;&lt;span class="s"&gt;"description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                Project content
            &lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*: note the use of&lt;code&gt;display: contents&lt;/code&gt; which allows for adding a list element layer without breaking the already written CSS.&lt;/p&gt;

&lt;p&gt;And here is the final result:&lt;/p&gt;

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

&lt;p&gt;Looks a lot better!&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick note
&lt;/h3&gt;

&lt;p&gt;I learned about ARIA-DevTools from this &lt;a href="https://www.youtube.com/watch?v=ykLHTtS5J_Q" rel="noopener noreferrer"&gt;Frontend Roadmap discussion&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>webdev</category>
      <category>html</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
