<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Prathamesh Patil</title>
    <description>The latest articles on Forem by Prathamesh Patil (@prathamesh_patil_98).</description>
    <link>https://forem.com/prathamesh_patil_98</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%2F2502856%2F9035015e-c07c-45f2-8373-83044d98071d.jpg</url>
      <title>Forem: Prathamesh Patil</title>
      <link>https://forem.com/prathamesh_patil_98</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/prathamesh_patil_98"/>
    <language>en</language>
    <item>
      <title>Good Frontend Dev !== Good coder</title>
      <dc:creator>Prathamesh Patil</dc:creator>
      <pubDate>Fri, 06 Dec 2024 17:11:52 +0000</pubDate>
      <link>https://forem.com/prathamesh_patil_98/good-frontend-dev-good-coder-2onn</link>
      <guid>https://forem.com/prathamesh_patil_98/good-frontend-dev-good-coder-2onn</guid>
      <description>&lt;p&gt;Hi Everyone, From last 3+ years working as a Frontend developer I realised that being good at coding is just not enough to deliver a high quality and robust feature. When it comes to development it involves proper planning and execution at every step. There are few do's and dont's that I follow to ace in this process:&lt;/p&gt;

&lt;h2&gt;
  
  
  DO'S
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Feature Planning:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the requirement thoroughly. &lt;/li&gt;
&lt;li&gt;Discuss with designers, backend developers, and stakeholders to align on expectations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Understand the User:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify the target audience for the feature.&lt;/li&gt;
&lt;li&gt;Always picture yourself in place of a user while developing the feature, this helps to provide good UX going ahead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Effective Communication:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regularly update the team about progress or potential blockers.&lt;/li&gt;
&lt;li&gt;Ensure alignment with designers and backend developers before starting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Plan &amp;amp; Prioritize:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Break down the feature into smaller, manageable tasks.&lt;/li&gt;
&lt;li&gt;Prioritize tasks based on dependencies and deadlines.&lt;/li&gt;
&lt;li&gt;Allocate sufficient time for testing and iterations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Think Long term:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Even if the feature is has minimal requirements, always build a system which can be made scalable and mantainable going ahead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Stay organised:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Document decisions made during planning.&lt;/li&gt;
&lt;li&gt;Keep track of changes, deadlines, and dependencies using tools like Trello, Jira, or Notion.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7. Focus on accessibility:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think about how users with disabilities might interact with the feature.&lt;/li&gt;
&lt;li&gt;Advocate for inclusive design even if it’s not explicitly requested.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  DONT'S
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Rush the planning phase:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don’t skip or rush through the requirement analysis and planning stages. Poor planning leads to rework and delays.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Be overprotective of your ideas:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid resisting suggestions or feedback. &lt;/li&gt;
&lt;li&gt;Features are a team effort, and other perspectives can improve the end result.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Overpromise deadlines:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don’t commit to unrealistic timelines under pressure. Be transparent about what’s feasible within the given time frame.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Underestimate testing importance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don’t assume the QA team or end-users will catch all issues. Prioritize thorough testing during development.&lt;/li&gt;
&lt;li&gt;Always write unit test cases for a safer side.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Ignoring personal well-being:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don’t overwork yourself to meet deadlines. Take breaks and maintain a healthy work-life balance to stay productive and creative.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;A well-developed feature isn’t just about clean code—it’s about understanding user needs, effective collaboration, and balancing priorities. Focusing on these non-technical aspects ensures the feature aligns with business goals and delivers a seamless experience for the end user.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>product</category>
    </item>
    <item>
      <title>Debouncing in JS: Building better web apps</title>
      <dc:creator>Prathamesh Patil</dc:creator>
      <pubDate>Thu, 05 Dec 2024 04:56:20 +0000</pubDate>
      <link>https://forem.com/prathamesh_patil_98/debouncing-in-js-building-better-web-apps-4g8h</link>
      <guid>https://forem.com/prathamesh_patil_98/debouncing-in-js-building-better-web-apps-4g8h</guid>
      <description>&lt;p&gt;Have you ever been on a website, typed into a search bar, and noticed how the suggestions pop up in real-time without causing any lag? Or maybe you've filled out a form and seen the "Username already taken" message appear just as you're typing. Behind these seamless experiences is a powerful, often unsung hero of modern web development: &lt;strong&gt;debouncing&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Debouncing?
&lt;/h2&gt;

&lt;p&gt;Debouncing is a programming technique that ensures a function is executed only after a specified period of inactivity. Imagine you're typing into a search bar. Without debouncing, every keystroke would trigger a function call, potentially overwhelming the system with redundant requests. Debouncing solves this by waiting for a pause in your typing before executing the function, ensuring only one request is sent.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;At its core its controlling the frequency of function execution. But for a easier understanding lets take an example of a door bell. Suppose there's a door beer that rings after 3 seconds of inactivity. After the initial ring if users tries to ring the bell as many times it won't ring unless he decides to pass another 3 seconds.&lt;/p&gt;

&lt;p&gt;In JavaScript, debouncing is commonly used with event listeners like input, scroll, or resize. Here's a basic implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function debounce(callback, delay) {
  let timeoutId;
  return (...args) =&amp;gt; {
    clearTimeout(timeoutId);
    timeoutId = setTimeout(() =&amp;gt; {
      callback(...args);
    }, delay);
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lets understanding the different elements of this code:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;debounce&lt;/code&gt;: The main function that creates and returns a debounced version of a given function.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;callback&lt;/code&gt;: The function to be executed after the debounced delay.&lt;/li&gt;
&lt;li&gt;delay: The amount of time (in milliseconds) the function should wait after the last event before executing the callback.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;timeoutId&lt;/code&gt; is defined to hold the identifier of the timer created by &lt;code&gt;setTimeout&lt;/code&gt;. This allows us to clear any ongoing timer before starting a new one, preventing unnecessary or repeated function executions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;clearTimeout&lt;/code&gt; cancels any existing timer associated with &lt;code&gt;timeoutId&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical use cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Search Input Fields:&lt;/strong&gt;
Live search is a classic use case for debouncing. Without it, every keystroke could trigger a database query, overwhelming the server. With debouncing, the function is called only after the user stops typing, reducing server load and improving performance.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const handleSearch = debounce((query) =&amp;gt; {
  fetch(`https://api.example.com/search?q=${query}`)
    .then((response) =&amp;gt; response.json())
    .then((data) =&amp;gt; console.log(data));
}, 500);

document.getElementById("search").addEventListener("input", (e) =&amp;gt; {
  handleSearch(e.target.value);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Form Validation:&lt;/strong&gt;
Instant feedback on forms is great, but validating input on every keystroke can be resource-intensive. Debouncing allows you to delay validation until the user stops typing.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const validateInput = debounce((input) =&amp;gt; {
  console.log(`Validating: ${input}`);
}, 400);

document.getElementById("username").addEventListener("input", (e) =&amp;gt; {
  validateInput(e.target.value);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Benefits of Debouncing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance Optimization&lt;/strong&gt;: Reduces the number of function calls, preventing unnecessary computations or network requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved User Experience&lt;/strong&gt;: Provides smoother, faster, and more responsive interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource Efficiency&lt;/strong&gt;: Reduces server load and conserves client-side resources, particularly important in large-scale applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
&lt;strong&gt;Open to Suggestions&lt;/strong&gt;&lt;br&gt;
Have insights or additional tips on improving this blog? Feel free to share your feedback! Your input is invaluable for enhancing future content.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>api</category>
      <category>performance</category>
    </item>
    <item>
      <title>A Complete Guide to Accessibility Compliance with WCAG 2.1</title>
      <dc:creator>Prathamesh Patil</dc:creator>
      <pubDate>Sat, 30 Nov 2024 13:24:15 +0000</pubDate>
      <link>https://forem.com/prathamesh_patil_98/a-complete-guide-to-accessibility-compliance-with-wcag-21-2of</link>
      <guid>https://forem.com/prathamesh_patil_98/a-complete-guide-to-accessibility-compliance-with-wcag-21-2of</guid>
      <description>&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%2Ffcwkctdhurtnkfoh37t0.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%2Ffcwkctdhurtnkfoh37t0.png" alt="Image description" width="800" height="488"&gt;&lt;/a&gt;&lt;br&gt;
A Complete Guide to Accessibility Compliance with WCAG 2.1&lt;br&gt;
In today’s digital landscape, creating an inclusive experience for all users is not just a moral responsibility—it's also a legal requirement in many regions. The Web Content Accessibility Guidelines (WCAG) are the gold standard for ensuring web accessibility. The latest version, WCAG 2.1, builds on WCAG 2.0, offering more specific criteria to improve access for people with disabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is WCAG 2.1?
&lt;/h2&gt;

&lt;p&gt;WCAG 2.1 is an internationally recognized set of guidelines developed by the Web Accessibility Initiative (WAI) under the World Wide Web Consortium (W3C). Its goal is to make web content more accessible to people with disabilities, including those with visual, auditory, physical, speech, cognitive, and neurological disabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is Accessibility Important?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inclusivity:&lt;/strong&gt; 1 billion people globally live with some form of disability. Accessible websites ensure everyone can access the same information and services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Legal Compliance:&lt;/strong&gt; Many countries have laws mandating web accessibility, such as the Americans with Disabilities Act (ADA) in the U.S., EU Directive 2016/2102, and The Rights of Persons with Disabilities Act in India.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better User Experience:&lt;/strong&gt; Accessibility enhancements often improve usability for all users, including those using mobile devices, smartwatches, or voice-activated systems.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Four Principles of WCAG 2.1
&lt;/h2&gt;

&lt;p&gt;WCAG 2.1 is based on four core principles, known by the acronym POUR:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Perceivable&lt;/strong&gt;&lt;br&gt;
Content must be presented in ways that all users can perceive, regardless of sensory disabilities.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text Alternatives (Alt Text): Provide alternative text for images.&lt;/li&gt;
&lt;li&gt;Keyboard Focus Visibility: Ensure focus indicators are visible for interacti``ve elements.&lt;/li&gt;
&lt;li&gt;Video Captions: Offer synchronized captions for video content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;code&gt;&amp;lt;img src="landscape.jpg" alt="A beautiful mountain landscape at sunset"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Operable&lt;/strong&gt;&lt;br&gt;
Users must be able to operate the interface using various input methods, including a keyboard.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keyboard Navigation: Ensure all interactive elements are accessible using the keyboard.&lt;/li&gt;
&lt;li&gt;Avoid Time Limits: If time limits are necessary, provide an option to extend or disable them.&lt;/li&gt;
&lt;li&gt;Skip Links: Include a “skip to content” link for easier navigation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
Skip to Main Content&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Understandable&lt;/strong&gt;&lt;br&gt;
Information and the operation of the user interface must be easy to understand.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consistent Navigation: Use a consistent layout and navigation system across the website.&lt;/li&gt;
&lt;li&gt;Error Identification: Clearly identify and explain form errors.&lt;/li&gt;
&lt;li&gt;Readable Text: Use simple language and provide definitions for jargon or abbreviations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;code&gt;`&lt;br&gt;
&amp;lt;label for="email"&amp;gt;Email:&amp;lt;/label&amp;gt;&lt;br&gt;
&amp;lt;input type="email" id="email" required aria-describedby="email-error"&amp;gt;&lt;br&gt;
&amp;lt;span id="email-error" class="error-message" role="alert"&amp;gt;Please enter a valid email address.&amp;lt;/span&amp;gt;&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Robust&lt;/strong&gt;&lt;br&gt;
Content must be robust enough to be reliably interpreted by a wide range of user agents, including assistive technologies.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Semantic HTML: Use proper HTML tags to convey meaning.&lt;/li&gt;
&lt;li&gt;ARIA Roles: Apply ARIA roles where native HTML does not provide sufficient semantics.
Example:
&lt;code&gt;&amp;lt;button aria-pressed="false"&amp;gt;Toggle Dark Mode&amp;lt;/button&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Implementing WCAG 2.1 Compliance: Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Perform an Accessibility Audit: Use tools like WAVE, axe DevTools, or Lighthouse to identify accessibility issues.&lt;/li&gt;
&lt;li&gt;Keyboard Testing: Ensure your website is fully operable using just a keyboard.&lt;/li&gt;
&lt;li&gt;Screen Reader Testing: Test your site with screen readers like NVDA, JAWS, or VoiceOver.&lt;/li&gt;
&lt;li&gt;Color Contrast Testing: Verify that all text and graphical elements meet contrast requirements.&lt;/li&gt;
&lt;li&gt;Continuous Monitoring: Accessibility is an ongoing process. Regularly review and update your website as guidelines evolve.&lt;/li&gt;
&lt;li&gt;Benefits of WCAG 2.1 Compliance&lt;/li&gt;
&lt;li&gt;Enhanced User Experience: An accessible site is easier to use for everyone.&lt;/li&gt;
&lt;li&gt;Increased Reach: Your site becomes accessible to a broader audience, including people with disabilities.&lt;/li&gt;
&lt;li&gt;SEO Boost: Many accessibility practices, like alt text and semantic HTML, improve SEO.&lt;/li&gt;
&lt;li&gt;Reduced Legal Risk: Compliance minimizes the risk of lawsuits related to accessibility.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Resources
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/WAI/" rel="noopener noreferrer"&gt;W3C Web Accessibility Initiative (WAI)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://webaim.org/" rel="noopener noreferrer"&gt;WebAIM: Web Accessibility in Mind&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/WCAG21/" rel="noopener noreferrer"&gt;WCAG 2.1 Guidelines&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;I hope this guide provides a clear understanding of WCAG 2.1 and its importance in building accessible web experiences. I'm open to any suggestions or feedback to improve this blog further. Your insights will help make this resource even more valuable for readers! 😊&lt;/p&gt;
&lt;/blockquote&gt;

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